vditor 3.9.7 → 3.9.9
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 +1 -0
- package/dist/images/emoji/liandi.png +0 -0
- package/dist/images/emoji/siyuan.png +0 -0
- package/dist/index.css +1 -1
- package/dist/index.min.js +1 -1
- package/dist/js/katex/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-Bold.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-Italic.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-Regular.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Math-Italic.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Script-Regular.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/js/katex/katex.min.css +1 -1
- package/dist/js/katex/katex.min.js +1 -2
- package/dist/js/katex/mhchem.min.js +1 -1
- package/dist/js/lute/lute.min.js +6 -6
- package/dist/method.d.ts +2 -2
- package/dist/method.min.js +1 -1
- package/dist/ts/sv/combineFootnote.d.ts +6 -0
- package/dist/types/index.d.ts +4 -1
- package/package.json +1 -1
- package/src/index.ts +4 -0
- package/src/ts/export/index.ts +2 -1
- package/src/ts/markdown/mathRender.ts +5 -3
- package/src/ts/markdown/previewRender.ts +9 -3
- package/src/ts/preview/index.ts +3 -0
- package/src/ts/sv/combineFootnote.ts +27 -0
- package/src/ts/sv/inputEvent.ts +25 -45
- package/src/ts/sv/process.ts +9 -16
- package/src/ts/toolbar/EditMode.ts +2 -0
- package/src/ts/util/Options.ts +10 -4
- package/src/ts/util/addScript.ts +3 -0
- package/src/ts/util/processCode.ts +10 -2
- package/src/ts/wysiwyg/highlightToolbarWYSIWYG.ts +16 -0
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
import {afterRenderEvent} from "./afterRenderEvent";
|
|
33
33
|
import {removeBlockElement} from "./processKeydown";
|
|
34
34
|
import {renderToc} from "../util/toc";
|
|
35
|
+
import {getMarkdown} from "../markdown/getMarkdown";
|
|
35
36
|
|
|
36
37
|
export const highlightToolbarWYSIWYG = (vditor: IVditor) => {
|
|
37
38
|
clearTimeout(vditor.wysiwyg.hlToolbarTimeoutId);
|
|
@@ -280,6 +281,9 @@ export const highlightToolbarWYSIWYG = (vditor: IVditor) => {
|
|
|
280
281
|
}
|
|
281
282
|
}
|
|
282
283
|
}
|
|
284
|
+
if (typeof vditor.options.input === "function") {
|
|
285
|
+
vditor.options.input(getMarkdown(vditor));
|
|
286
|
+
}
|
|
283
287
|
};
|
|
284
288
|
|
|
285
289
|
const setAlign = (type: string) => {
|
|
@@ -574,6 +578,9 @@ export const highlightToolbarWYSIWYG = (vditor: IVditor) => {
|
|
|
574
578
|
if (input.value.trim() !== "") {
|
|
575
579
|
footnotesRefElement.setAttribute("data-footnotes-label", input.value);
|
|
576
580
|
}
|
|
581
|
+
if (typeof vditor.options.input === "function") {
|
|
582
|
+
vditor.options.input(getMarkdown(vditor));
|
|
583
|
+
}
|
|
577
584
|
};
|
|
578
585
|
input.onkeydown = (event) => {
|
|
579
586
|
if (event.isComposing) {
|
|
@@ -708,6 +715,9 @@ export const highlightToolbarWYSIWYG = (vditor: IVditor) => {
|
|
|
708
715
|
input.value = headingElement.getAttribute("data-id") || "";
|
|
709
716
|
input.oninput = () => {
|
|
710
717
|
headingElement.setAttribute("data-id", input.value);
|
|
718
|
+
if (typeof vditor.options.input === "function") {
|
|
719
|
+
vditor.options.input(getMarkdown(vditor));
|
|
720
|
+
}
|
|
711
721
|
};
|
|
712
722
|
input.onkeydown = (event) => {
|
|
713
723
|
if (event.isComposing) {
|
|
@@ -802,6 +812,9 @@ export const genLinkRefPopover = (vditor: IVditor, linkRefElement: HTMLElement,
|
|
|
802
812
|
if (input1.value.trim() !== "") {
|
|
803
813
|
linkRefElement.setAttribute("data-link-label", input1.value);
|
|
804
814
|
}
|
|
815
|
+
if (typeof vditor.options.input === "function") {
|
|
816
|
+
vditor.options.input(getMarkdown(vditor));
|
|
817
|
+
}
|
|
805
818
|
};
|
|
806
819
|
|
|
807
820
|
const inputWrap = document.createElement("span");
|
|
@@ -1055,6 +1068,9 @@ export const genImagePopover = (event: Event, vditor: IVditor) => {
|
|
|
1055
1068
|
imgElement.setAttribute("src", inputElement.value);
|
|
1056
1069
|
imgElement.setAttribute("alt", alt.value);
|
|
1057
1070
|
imgElement.setAttribute("title", title.value);
|
|
1071
|
+
if (typeof vditor.options.input === "function") {
|
|
1072
|
+
vditor.options.input(getMarkdown(vditor));
|
|
1073
|
+
}
|
|
1058
1074
|
};
|
|
1059
1075
|
|
|
1060
1076
|
const inputWrap = document.createElement("span");
|