|
@@ -35,15 +35,17 @@ $(function () {
|
|
|
readOnly: false,
|
|
|
holder: 'editorjs',
|
|
|
});
|
|
|
- if ($('#editorjs1').length > 0)
|
|
|
+ /* if ($('#editorjs1').length > 0)
|
|
|
editor1 = new EditorJS({
|
|
|
readOnly: false,
|
|
|
holder: 'editorjs1',
|
|
|
- });
|
|
|
+ }); */
|
|
|
|
|
|
});
|
|
|
|
|
|
function getHeader(url) {
|
|
|
+ var editor1;
|
|
|
+
|
|
|
axios.get(contentApiUrl + url).then(({ data }) => {
|
|
|
frontMatters = [];
|
|
|
contentMatters = [];
|
|
@@ -56,11 +58,30 @@ function getHeader(url) {
|
|
|
//const content = _.get(data, '0.content', '');
|
|
|
blocks = parseMd(aa);
|
|
|
oTitle = $("#ctitle").val();
|
|
|
- // console.log($("#ctitle"));
|
|
|
+ //console.log($("#ctype").val());
|
|
|
// $("#dialog-form").dialog();
|
|
|
- if ($("#ctype").val() == "collection") {
|
|
|
+ if ($("#ctype").val() == "collection")
|
|
|
+ {
|
|
|
$("#scat").hide();
|
|
|
+ console.log($("#ctype").val());
|
|
|
+ editor1 = new EditorJS({
|
|
|
+ readOnly: false,
|
|
|
+ holder: 'editorjs1',
|
|
|
+ tools: {
|
|
|
+ paragraph: { inlineToolbar: false },
|
|
|
+ image: {
|
|
|
+ class: ImageTool,
|
|
|
+ config: {
|
|
|
+ endpoints: {
|
|
|
+ byFile: '/backstage/upload' + $('#curl').val(),
|
|
|
+ byUrl: '/backstage/getimage' + $('#curl').val(),
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
+
|
|
|
else if ($("#ctype").val() == "maincategories" || $("#ctype").val() == "blog") {
|
|
|
$("#sdesc").hide();
|
|
|
}
|
|
@@ -713,6 +734,7 @@ function ParseProductSection(inContent) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
, data: { blocks: editorBlocks1 }
|
|
|
,
|
|
|
onReady: function () {
|