Skip to content

Commit

Permalink
🐛 fix #1228
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed May 16, 2022
1 parent b43f454 commit 2ff1bfb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -97,6 +97,7 @@

### v3.8.15 / 2022-06

* [1228](https://github.com/Vanessa219/vditor/issues/1228) 使用删除图标删除后,大纲没有自动更新 `修复缺陷`
* [1230](https://github.com/Vanessa219/vditor/issues/1230) cnd preview path 重复加载问题 `改进功能`

### v3.8.14 / 2022-05
Expand Down
4 changes: 4 additions & 0 deletions src/ts/wysiwyg/highlightToolbarWYSIWYG.ts
Expand Up @@ -31,6 +31,7 @@ import {
} from "../util/selection";
import {afterRenderEvent} from "./afterRenderEvent";
import {removeBlockElement} from "./processKeydown";
import {renderToc} from "../util/toc";

export const highlightToolbarWYSIWYG = (vditor: IVditor) => {
clearTimeout(vditor.wysiwyg.hlToolbarTimeoutId);
Expand Down Expand Up @@ -931,6 +932,9 @@ const genClose = (element: HTMLElement, vditor: IVditor) => {
element.remove();
afterRenderEvent(vditor);
highlightToolbarWYSIWYG(vditor);
if (["H1", "H2", "H3", "H4", "H5" ,"H6"].includes(element.tagName)) {
renderToc(vditor);
}
};
vditor.wysiwyg.popover.insertAdjacentElement("beforeend", close);
};
Expand Down

0 comments on commit 2ff1bfb

Please sign in to comment.