vditor 3.8.14 → 3.8.15
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 +2 -2
- package/dist/index.css +1 -1
- package/dist/index.min.js +1 -1
- package/dist/method.min.js +1 -1
- package/package.json +1 -1
- package/src/ts/constants.ts +1 -1
- package/src/ts/toolbar/Info.ts +1 -1
- package/src/ts/ui/setContentTheme.ts +1 -1
- package/src/ts/upload/index.ts +3 -0
- package/src/ts/util/fixBrowserBehavior.ts +1272 -1247
- package/src/ts/wysiwyg/highlightToolbarWYSIWYG.ts +4 -0
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
} from "../util/selection";
|
|
32
32
|
import {afterRenderEvent} from "./afterRenderEvent";
|
|
33
33
|
import {removeBlockElement} from "./processKeydown";
|
|
34
|
+
import {renderToc} from "../util/toc";
|
|
34
35
|
|
|
35
36
|
export const highlightToolbarWYSIWYG = (vditor: IVditor) => {
|
|
36
37
|
clearTimeout(vditor.wysiwyg.hlToolbarTimeoutId);
|
|
@@ -931,6 +932,9 @@ const genClose = (element: HTMLElement, vditor: IVditor) => {
|
|
|
931
932
|
element.remove();
|
|
932
933
|
afterRenderEvent(vditor);
|
|
933
934
|
highlightToolbarWYSIWYG(vditor);
|
|
935
|
+
if (["H1", "H2", "H3", "H4", "H5" ,"H6"].includes(element.tagName)) {
|
|
936
|
+
renderToc(vditor);
|
|
937
|
+
}
|
|
934
938
|
};
|
|
935
939
|
vditor.wysiwyg.popover.insertAdjacentElement("beforeend", close);
|
|
936
940
|
};
|