md-editor-v3 2.1.2 → 2.2.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -17
- package/lib/MdEditor/Editor.d.ts +7 -1
- package/lib/MdEditor/config.d.ts +26 -0
- package/lib/MdEditor/extensions/MdCatalog/CatalogLink.d.ts +9 -0
- package/lib/MdEditor/extensions/MdCatalog/index.d.ts +4 -2
- package/lib/MdEditor/index.d.ts +18 -6
- package/lib/MdEditor/type.d.ts +8 -2
- package/lib/md-editor-v3.es.js +88 -62
- package/lib/md-editor-v3.umd.js +64 -64
- package/lib/style.css +1 -1
- package/package.json +10 -13
- package/lib/MdEditor/utils/config.d.ts +0 -3
package/lib/md-editor-v3.es.js
CHANGED
|
@@ -264,6 +264,23 @@ const codeCss = {
|
|
|
264
264
|
dark: `${cdnBase}/highlight.js/11.5.1/styles/stackoverflow-dark.min.css`
|
|
265
265
|
}
|
|
266
266
|
};
|
|
267
|
+
const configOption = {
|
|
268
|
+
markedRenderer: (r) => r,
|
|
269
|
+
markedExtensions: [],
|
|
270
|
+
markedOptions: {},
|
|
271
|
+
editorExtensions: {},
|
|
272
|
+
editorConfig: {}
|
|
273
|
+
};
|
|
274
|
+
const config = (option) => {
|
|
275
|
+
if (option) {
|
|
276
|
+
for (const key in option) {
|
|
277
|
+
const optionItem = option[key];
|
|
278
|
+
if (optionItem) {
|
|
279
|
+
configOption[key] = optionItem;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
};
|
|
267
284
|
class Bus {
|
|
268
285
|
constructor() {
|
|
269
286
|
this.pools = {};
|
|
@@ -771,10 +788,10 @@ const useKeyBoard = (props2, context) => {
|
|
|
771
788
|
}
|
|
772
789
|
});
|
|
773
790
|
};
|
|
774
|
-
const useProvide = (props2
|
|
791
|
+
const useProvide = (props2) => {
|
|
775
792
|
var _a;
|
|
776
793
|
const { editorId } = props2;
|
|
777
|
-
const highlightConfig = (_a =
|
|
794
|
+
const highlightConfig = (_a = configOption == null ? void 0 : configOption.editorExtensions) == null ? void 0 : _a.highlight;
|
|
778
795
|
provide("editorId", editorId);
|
|
779
796
|
provide("tabWidth", props2.tabWidth);
|
|
780
797
|
provide("theme", computed(() => props2.theme));
|
|
@@ -790,7 +807,7 @@ const useProvide = (props2, extension) => {
|
|
|
790
807
|
provide("showCodeRowNumber", props2.showCodeRowNumber);
|
|
791
808
|
const usedLanguageText = computed(() => {
|
|
792
809
|
var _a2;
|
|
793
|
-
const allText = __spreadValues(__spreadValues({}, staticTextDefault), (_a2 =
|
|
810
|
+
const allText = __spreadValues(__spreadValues({}, staticTextDefault), (_a2 = configOption == null ? void 0 : configOption.editorConfig) == null ? void 0 : _a2.languageUserDefined);
|
|
794
811
|
if (allText[props2.language]) {
|
|
795
812
|
return allText[props2.language];
|
|
796
813
|
} else {
|
|
@@ -799,39 +816,44 @@ const useProvide = (props2, extension) => {
|
|
|
799
816
|
});
|
|
800
817
|
provide("usedLanguageText", usedLanguageText);
|
|
801
818
|
provide("previewTheme", computed(() => props2.previewTheme));
|
|
802
|
-
provide("extension", extension);
|
|
803
819
|
};
|
|
804
|
-
const useExpansion = (props2
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
820
|
+
const useExpansion = (props2) => {
|
|
821
|
+
var _a, _b, _c, _d, _e, _f;
|
|
822
|
+
const { noPrettier, previewOnly, noIconfont } = props2;
|
|
823
|
+
const { editorExtensions } = configOption;
|
|
824
|
+
const noPrettierScript = noPrettier || !!((_b = (_a = configOption.editorExtensions) == null ? void 0 : _a.prettier) == null ? void 0 : _b.prettierInstance);
|
|
825
|
+
const noParserMarkdownScript = noPrettier || !!((_d = (_c = configOption.editorExtensions) == null ? void 0 : _c.prettier) == null ? void 0 : _d.parserMarkdownInstance);
|
|
826
|
+
const noCropperScript = !!((_f = (_e = configOption.editorExtensions) == null ? void 0 : _e.cropper) == null ? void 0 : _f.instance);
|
|
809
827
|
onMounted(() => {
|
|
810
|
-
var
|
|
828
|
+
var _a2, _b2, _c2, _d2;
|
|
811
829
|
const iconfontScript = document.createElement("script");
|
|
812
|
-
iconfontScript.src = (
|
|
830
|
+
iconfontScript.src = (editorExtensions == null ? void 0 : editorExtensions.iconfont) || iconfontUrl;
|
|
813
831
|
iconfontScript.id = `${prefix}-icon`;
|
|
814
832
|
const prettierScript = document.createElement("script");
|
|
815
833
|
const prettierMDScript = document.createElement("script");
|
|
816
|
-
prettierScript.src = ((
|
|
834
|
+
prettierScript.src = ((_a2 = editorExtensions == null ? void 0 : editorExtensions.prettier) == null ? void 0 : _a2.standaloneJs) || prettierUrl.main;
|
|
817
835
|
prettierScript.id = `${prefix}-prettier`;
|
|
818
|
-
prettierMDScript.src = ((
|
|
836
|
+
prettierMDScript.src = ((_b2 = editorExtensions == null ? void 0 : editorExtensions.prettier) == null ? void 0 : _b2.parserMarkdownJs) || prettierUrl.markdown;
|
|
819
837
|
prettierMDScript.id = `${prefix}-prettierMD`;
|
|
820
838
|
const cropperLink = document.createElement("link");
|
|
821
839
|
cropperLink.rel = "stylesheet";
|
|
822
|
-
cropperLink.href = ((
|
|
840
|
+
cropperLink.href = ((_c2 = editorExtensions == null ? void 0 : editorExtensions.cropper) == null ? void 0 : _c2.css) || cropperUrl.css;
|
|
823
841
|
cropperLink.id = `${prefix}-cropperCss`;
|
|
824
842
|
const cropperScript = document.createElement("script");
|
|
825
|
-
cropperScript.src = ((
|
|
843
|
+
cropperScript.src = ((_d2 = editorExtensions == null ? void 0 : editorExtensions.cropper) == null ? void 0 : _d2.js) || cropperUrl.js;
|
|
826
844
|
cropperScript.id = `${prefix}-cropper`;
|
|
827
845
|
if (!previewOnly) {
|
|
828
|
-
|
|
829
|
-
|
|
846
|
+
if (!noIconfont) {
|
|
847
|
+
appendHandler(iconfontScript);
|
|
848
|
+
}
|
|
849
|
+
if (!noCropperScript) {
|
|
830
850
|
appendHandler(cropperLink);
|
|
831
851
|
appendHandler(cropperScript);
|
|
832
852
|
}
|
|
833
|
-
if (!
|
|
853
|
+
if (!noPrettierScript) {
|
|
834
854
|
appendHandler(prettierScript);
|
|
855
|
+
}
|
|
856
|
+
if (!noParserMarkdownScript) {
|
|
835
857
|
appendHandler(prettierMDScript);
|
|
836
858
|
}
|
|
837
859
|
}
|
|
@@ -1343,8 +1365,7 @@ var ClipModal = defineComponent({
|
|
|
1343
1365
|
var _a, _b;
|
|
1344
1366
|
const ult = inject("usedLanguageText");
|
|
1345
1367
|
const editorId = inject("editorId");
|
|
1346
|
-
|
|
1347
|
-
let Cropper = (_b = (_a = extension == null ? void 0 : extension.editorExtensions) == null ? void 0 : _a.cropper) == null ? void 0 : _b.instance;
|
|
1368
|
+
let Cropper = (_b = (_a = configOption == null ? void 0 : configOption.editorExtensions) == null ? void 0 : _a.cropper) == null ? void 0 : _b.instance;
|
|
1348
1369
|
const uploadRef = ref();
|
|
1349
1370
|
const uploadImgRef = ref();
|
|
1350
1371
|
const previewTargetRef = ref();
|
|
@@ -1521,9 +1542,8 @@ const useSreenfull = (props2) => {
|
|
|
1521
1542
|
var _a, _b, _c, _d;
|
|
1522
1543
|
const editorId = inject("editorId");
|
|
1523
1544
|
const previewOnly = inject("previewOnly");
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
const screenfullJs = (_d = (_c = extension.editorExtensions) == null ? void 0 : _c.screenfull) == null ? void 0 : _d.js;
|
|
1545
|
+
let screenfull = (_b = (_a = configOption.editorExtensions) == null ? void 0 : _a.screenfull) == null ? void 0 : _b.instance;
|
|
1546
|
+
const screenfullJs = (_d = (_c = configOption.editorExtensions) == null ? void 0 : _c.screenfull) == null ? void 0 : _d.js;
|
|
1527
1547
|
const screenfullMe = ref(false);
|
|
1528
1548
|
const fullScreenHandler = () => {
|
|
1529
1549
|
if (!screenfull) {
|
|
@@ -4875,13 +4895,14 @@ const splitHelp = (textarea) => {
|
|
|
4875
4895
|
};
|
|
4876
4896
|
};
|
|
4877
4897
|
const directive2flag = (direct, selectedText = "", inputArea, params) => {
|
|
4898
|
+
var _a, _b, _c, _d, _e;
|
|
4878
4899
|
let targetValue = "";
|
|
4879
4900
|
let deviationStart = 0;
|
|
4880
4901
|
let deviationEnd = 0;
|
|
4881
4902
|
let select = false;
|
|
4882
4903
|
let prefixVal;
|
|
4883
4904
|
let subfixVal;
|
|
4884
|
-
const mermaidTemplate =
|
|
4905
|
+
const mermaidTemplate = (_a = configOption.editorConfig) == null ? void 0 : _a.mermaidTemplate;
|
|
4885
4906
|
if (/^h[1-6]{1}$/.test(direct)) {
|
|
4886
4907
|
const pix = direct.replace(/^h(\d)/, (_, num) => {
|
|
4887
4908
|
return new Array(Number(num)).fill("#", 0, num).join("");
|
|
@@ -4889,16 +4910,20 @@ const directive2flag = (direct, selectedText = "", inputArea, params) => {
|
|
|
4889
4910
|
targetValue = `${pix} ${selectedText}`;
|
|
4890
4911
|
deviationStart = pix.length + 1;
|
|
4891
4912
|
} else if (direct === "prettier") {
|
|
4892
|
-
|
|
4913
|
+
const prettier = window.prettier || ((_c = (_b = configOption.editorExtensions) == null ? void 0 : _b.prettier) == null ? void 0 : _c.prettierInstance);
|
|
4914
|
+
const prettierPlugins = window.prettierPlugins || [
|
|
4915
|
+
(_e = (_d = configOption.editorExtensions) == null ? void 0 : _d.prettier) == null ? void 0 : _e.parserMarkdownInstance
|
|
4916
|
+
];
|
|
4917
|
+
if (!prettier || prettierPlugins[0] === void 0) {
|
|
4893
4918
|
bus.emit(params.editorId, "errorCatcher", {
|
|
4894
4919
|
name: "prettier",
|
|
4895
4920
|
message: "prettier is undefined"
|
|
4896
4921
|
});
|
|
4897
4922
|
return inputArea.value;
|
|
4898
4923
|
}
|
|
4899
|
-
return
|
|
4924
|
+
return prettier.format(inputArea.value, {
|
|
4900
4925
|
parser: "markdown",
|
|
4901
|
-
plugins:
|
|
4926
|
+
plugins: prettierPlugins
|
|
4902
4927
|
});
|
|
4903
4928
|
} else {
|
|
4904
4929
|
switch (direct) {
|
|
@@ -5396,10 +5421,11 @@ const useMarked = (props2, mermaidData) => {
|
|
|
5396
5421
|
markedOptions,
|
|
5397
5422
|
editorExtensions,
|
|
5398
5423
|
editorConfig
|
|
5399
|
-
} =
|
|
5424
|
+
} = configOption;
|
|
5400
5425
|
const showCodeRowNumber = inject("showCodeRowNumber");
|
|
5401
5426
|
const editorId = inject("editorId");
|
|
5402
5427
|
const highlightUrl2 = inject("highlight");
|
|
5428
|
+
const previewOnly = inject("previewOnly");
|
|
5403
5429
|
const highlightIns = (_a = editorExtensions == null ? void 0 : editorExtensions.highlight) == null ? void 0 : _a.instance;
|
|
5404
5430
|
const mermaidIns = (_b = editorExtensions == null ? void 0 : editorExtensions.mermaid) == null ? void 0 : _b.instance;
|
|
5405
5431
|
const katexIns = (_c = editorExtensions == null ? void 0 : editorExtensions.katex) == null ? void 0 : _c.instance;
|
|
@@ -5437,8 +5463,8 @@ const useMarked = (props2, mermaidData) => {
|
|
|
5437
5463
|
}
|
|
5438
5464
|
return markedCode.call(renderer, code, language, isEscaped);
|
|
5439
5465
|
};
|
|
5440
|
-
renderer.image = (href, title
|
|
5441
|
-
return `<span class="figure"><img src="${href}" title="${title}" alt="${desc}" zoom><span class="figcaption">${desc}</span></span>`;
|
|
5466
|
+
renderer.image = (href, title, desc) => {
|
|
5467
|
+
return `<span class="figure"><img src="${href}" title="${title || ""}" alt="${desc || ""}" zoom><span class="figcaption">${desc || ""}</span></span>`;
|
|
5442
5468
|
};
|
|
5443
5469
|
renderer.listitem = (text, task) => {
|
|
5444
5470
|
if (task) {
|
|
@@ -5455,7 +5481,7 @@ const useMarked = (props2, mermaidData) => {
|
|
|
5455
5481
|
renderer.heading = (text, level, raw, slugger) => {
|
|
5456
5482
|
heads.value.push({ text: raw, level });
|
|
5457
5483
|
if (isNewHeading) {
|
|
5458
|
-
return newHeading.call(renderer, text, level, raw, slugger);
|
|
5484
|
+
return newHeading.call(renderer, text, level, raw, slugger, heads.value.length);
|
|
5459
5485
|
}
|
|
5460
5486
|
const id = props2.markedHeadingId(raw, level, heads.value.length);
|
|
5461
5487
|
if (text !== raw) {
|
|
@@ -5482,7 +5508,7 @@ const useMarked = (props2, mermaidData) => {
|
|
|
5482
5508
|
const hljsLang = highlightIns.getLanguage(language);
|
|
5483
5509
|
if (language && hljsLang) {
|
|
5484
5510
|
codeHtml = highlightIns.highlight(code, {
|
|
5485
|
-
language
|
|
5511
|
+
language,
|
|
5486
5512
|
ignoreIllegals: true
|
|
5487
5513
|
}).value;
|
|
5488
5514
|
} else {
|
|
@@ -5503,7 +5529,7 @@ const useMarked = (props2, mermaidData) => {
|
|
|
5503
5529
|
const _html = props2.sanitize(marked(props2.value || "", { renderer }));
|
|
5504
5530
|
html.value = _html;
|
|
5505
5531
|
props2.onHtmlChanged(_html);
|
|
5506
|
-
}, (editorConfig == null ? void 0 : editorConfig.renderDelay) !== void 0 ? editorConfig == null ? void 0 : editorConfig.renderDelay : 500);
|
|
5532
|
+
}, (editorConfig == null ? void 0 : editorConfig.renderDelay) !== void 0 ? editorConfig == null ? void 0 : editorConfig.renderDelay : previewOnly ? 0 : 500);
|
|
5507
5533
|
watch([
|
|
5508
5534
|
highlightInited,
|
|
5509
5535
|
toRef(mermaidData, "reRender"),
|
|
@@ -5518,7 +5544,7 @@ const useMarked = (props2, mermaidData) => {
|
|
|
5518
5544
|
const hljsLang = window.hljs.getLanguage(language);
|
|
5519
5545
|
if (language && hljsLang) {
|
|
5520
5546
|
codeHtml = window.hljs.highlight(code, {
|
|
5521
|
-
language
|
|
5547
|
+
language,
|
|
5522
5548
|
ignoreIllegals: true
|
|
5523
5549
|
}).value;
|
|
5524
5550
|
} else {
|
|
@@ -5634,9 +5660,12 @@ const useAutoScroll = (props2, html, textAreaRef, previewRef, htmlRef) => {
|
|
|
5634
5660
|
});
|
|
5635
5661
|
onMounted(() => {
|
|
5636
5662
|
initCopyEntry();
|
|
5637
|
-
if (!previewOnly &&
|
|
5663
|
+
if (!previewOnly && (previewRef.value || htmlRef.value)) {
|
|
5638
5664
|
[initScrollAuto, clearScrollAuto] = scrollAuto(textAreaRef.value, previewRef.value || htmlRef.value);
|
|
5639
5665
|
}
|
|
5666
|
+
if (props2.scrollAuto) {
|
|
5667
|
+
initScrollAuto();
|
|
5668
|
+
}
|
|
5640
5669
|
});
|
|
5641
5670
|
};
|
|
5642
5671
|
const useAutoGenrator = (props2, textAreaRef) => {
|
|
@@ -5679,7 +5708,6 @@ ${nextOrder}. `, {}));
|
|
|
5679
5708
|
callback(direct, params = {}) {
|
|
5680
5709
|
props2.onChange(directive2flag(direct, selectedText.value, textAreaRef.value, __spreadProps(__spreadValues({}, params), {
|
|
5681
5710
|
tabWidth,
|
|
5682
|
-
mermaidTemplate: props2.mermaidTemplate,
|
|
5683
5711
|
editorId
|
|
5684
5712
|
})));
|
|
5685
5713
|
}
|
|
@@ -5698,7 +5726,7 @@ ${nextOrder}. `, {}));
|
|
|
5698
5726
|
};
|
|
5699
5727
|
const useMermaid = (props2) => {
|
|
5700
5728
|
const theme = inject("theme");
|
|
5701
|
-
const { editorExtensions } =
|
|
5729
|
+
const { editorExtensions } = configOption;
|
|
5702
5730
|
const mermaidConf = editorExtensions == null ? void 0 : editorExtensions.mermaid;
|
|
5703
5731
|
const mermaidData = reactive({
|
|
5704
5732
|
reRender: false,
|
|
@@ -5822,10 +5850,6 @@ var Content = defineComponent({
|
|
|
5822
5850
|
type: Boolean,
|
|
5823
5851
|
default: false
|
|
5824
5852
|
},
|
|
5825
|
-
mermaidTemplate: {
|
|
5826
|
-
type: Object,
|
|
5827
|
-
default: () => ({})
|
|
5828
|
-
},
|
|
5829
5853
|
scrollAuto: {
|
|
5830
5854
|
type: Boolean
|
|
5831
5855
|
}
|
|
@@ -6042,16 +6066,23 @@ const CatalogLink = defineComponent({
|
|
|
6042
6066
|
scrollElement: {
|
|
6043
6067
|
type: [String, Object],
|
|
6044
6068
|
default: ""
|
|
6069
|
+
},
|
|
6070
|
+
onClick: {
|
|
6071
|
+
type: Function,
|
|
6072
|
+
default: () => {
|
|
6073
|
+
}
|
|
6045
6074
|
}
|
|
6046
6075
|
},
|
|
6047
6076
|
setup({
|
|
6048
6077
|
tocItem,
|
|
6049
6078
|
markedHeadingId: markedHeadingId2,
|
|
6050
|
-
scrollElement
|
|
6079
|
+
scrollElement,
|
|
6080
|
+
onClick
|
|
6051
6081
|
}) {
|
|
6052
6082
|
return () => createVNode("div", {
|
|
6053
6083
|
"class": `${prefix}-catalog-link`,
|
|
6054
6084
|
"onClick": (e) => {
|
|
6085
|
+
onClick(e, tocItem);
|
|
6055
6086
|
e.stopPropagation();
|
|
6056
6087
|
const id = markedHeadingId2(tocItem.text, tocItem.level, tocItem.index);
|
|
6057
6088
|
const targetHeadEle = document.getElementById(id);
|
|
@@ -6079,7 +6110,8 @@ const CatalogLink = defineComponent({
|
|
|
6079
6110
|
"markedHeadingId": markedHeadingId2,
|
|
6080
6111
|
"key": item.text,
|
|
6081
6112
|
"tocItem": item,
|
|
6082
|
-
"scrollElement": scrollElement
|
|
6113
|
+
"scrollElement": scrollElement,
|
|
6114
|
+
"onClick": onClick
|
|
6083
6115
|
}, null))])]);
|
|
6084
6116
|
}
|
|
6085
6117
|
});
|
|
@@ -6106,7 +6138,8 @@ const MdCatalog = defineComponent({
|
|
|
6106
6138
|
default: "light"
|
|
6107
6139
|
}
|
|
6108
6140
|
},
|
|
6109
|
-
|
|
6141
|
+
emits: ["onClick"],
|
|
6142
|
+
setup(props2, ctx) {
|
|
6110
6143
|
const editorId = props2.editorId;
|
|
6111
6144
|
const state = reactive({
|
|
6112
6145
|
list: [],
|
|
@@ -6166,7 +6199,10 @@ const MdCatalog = defineComponent({
|
|
|
6166
6199
|
"markedHeadingId": props2.markedHeadingId,
|
|
6167
6200
|
"tocItem": item,
|
|
6168
6201
|
"key": item.text,
|
|
6169
|
-
"scrollElement": state.scrollElement
|
|
6202
|
+
"scrollElement": state.scrollElement,
|
|
6203
|
+
"onClick": (e, t) => {
|
|
6204
|
+
ctx.emit("onClick", e, t);
|
|
6205
|
+
}
|
|
6170
6206
|
}, null);
|
|
6171
6207
|
})]);
|
|
6172
6208
|
}
|
|
@@ -6302,6 +6338,9 @@ const props = {
|
|
|
6302
6338
|
},
|
|
6303
6339
|
defFooters: {
|
|
6304
6340
|
type: [String, Object]
|
|
6341
|
+
},
|
|
6342
|
+
noIconfont: {
|
|
6343
|
+
type: Boolean
|
|
6305
6344
|
}
|
|
6306
6345
|
};
|
|
6307
6346
|
const Editor = defineComponent({
|
|
@@ -6312,20 +6351,19 @@ const Editor = defineComponent({
|
|
|
6312
6351
|
const {
|
|
6313
6352
|
editorId
|
|
6314
6353
|
} = props2;
|
|
6315
|
-
const extension = Editor.extension || {};
|
|
6316
6354
|
const state = reactive({
|
|
6317
6355
|
scrollAuto: props2.scrollAuto
|
|
6318
6356
|
});
|
|
6319
6357
|
useKeyBoard(props2, context);
|
|
6320
|
-
useProvide(props2
|
|
6321
|
-
useExpansion(props2
|
|
6358
|
+
useProvide(props2);
|
|
6359
|
+
useExpansion(props2);
|
|
6322
6360
|
const [setting, updateSetting] = useConfig(props2, context);
|
|
6323
6361
|
const [catalogVisible, catalogShow] = useCatalog(props2);
|
|
6324
6362
|
onBeforeUnmount(() => {
|
|
6325
6363
|
bus.clear(editorId);
|
|
6326
6364
|
});
|
|
6327
6365
|
return () => {
|
|
6328
|
-
var _a
|
|
6366
|
+
var _a;
|
|
6329
6367
|
const defToolbars = getSlot({
|
|
6330
6368
|
props: props2,
|
|
6331
6369
|
ctx: context
|
|
@@ -6377,9 +6415,8 @@ const Editor = defineComponent({
|
|
|
6377
6415
|
"sanitize": props2.sanitize,
|
|
6378
6416
|
"placeholder": props2.placeholder,
|
|
6379
6417
|
"noKatex": props2.noKatex,
|
|
6380
|
-
"mermaidTemplate": (_a = extension == null ? void 0 : extension.editorConfig) == null ? void 0 : _a.mermaidTemplate,
|
|
6381
6418
|
"scrollAuto": state.scrollAuto
|
|
6382
|
-
}, null), !props2.previewOnly && ((
|
|
6419
|
+
}, null), !props2.previewOnly && ((_a = props2.footers) == null ? void 0 : _a.length) > 0 && createVNode(Footer, {
|
|
6383
6420
|
"modelValue": props2.modelValue,
|
|
6384
6421
|
"footers": props2.footers,
|
|
6385
6422
|
"defFooters": defFooters,
|
|
@@ -6578,17 +6615,6 @@ var ModalToolbar = defineComponent({
|
|
|
6578
6615
|
};
|
|
6579
6616
|
}
|
|
6580
6617
|
});
|
|
6581
|
-
const config = function(option = {
|
|
6582
|
-
markedRenderer: (r) => r,
|
|
6583
|
-
markedExtensions: [],
|
|
6584
|
-
markedOptions: {},
|
|
6585
|
-
editorExtensions: {}
|
|
6586
|
-
}) {
|
|
6587
|
-
Reflect.defineProperty(this, "extension", {
|
|
6588
|
-
value: option,
|
|
6589
|
-
enumerable: true
|
|
6590
|
-
});
|
|
6591
|
-
};
|
|
6592
6618
|
Editor.install = (app) => {
|
|
6593
6619
|
app.component(Editor.name, Editor);
|
|
6594
6620
|
app.component(NormalToolbar.name, NormalToolbar);
|