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.
@@ -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
  };