diff --git a/app/src/protyle/wysiwyg/remove.ts b/app/src/protyle/wysiwyg/remove.ts index 332daacf9..5cd630bd6 100644 --- a/app/src/protyle/wysiwyg/remove.ts +++ b/app/src/protyle/wysiwyg/remove.ts @@ -18,6 +18,7 @@ import {hideElements} from "../ui/hideElements"; import {Constants} from "../../constants"; import {scrollCenter} from "../../util/highlightById"; import {isMobile} from "../../util/functions"; +import {mathRender} from "../render/mathRender"; export const removeBlock = (protyle: IProtyle, blockElement: Element, range: Range, type: "Delete" | "Backspace" | "remove") => { // 删除后,防止滚动条滚动后调用 get 请求,因为返回的请求已查找不到内容块了 @@ -409,6 +410,7 @@ export const removeBlock = (protyle: IProtyle, blockElement: Element, range: Ran range.insertNode(leftNodes); // 图片前删除到上一个文字块时,图片前有 zwsp previousLastElement.outerHTML = protyle.lute.SpinBlockDOM(previousLastElement.outerHTML); + mathRender(getPreviousBlock(removeElement) as HTMLElement); removeElement.remove(); // extractContents 内容过多时需要进行滚动条重置,否则位置会错位 protyle.contentElement.scrollTop = scroll;