Skip to content

Commit

Permalink
🎨 fix #9264
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Sep 28, 2023
1 parent ceb9aef commit 17d2a16
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/src/protyle/gutter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1579,13 +1579,17 @@ export class Gutter {
id,
level
}, (response) => {
response.data.doOperations.forEach((operation: IOperation) => {
response.data.doOperations.forEach((operation: IOperation, index: number) => {
protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${operation.id}"]`).forEach((itemElement: HTMLElement) => {
itemElement.outerHTML = operation.data;
});
// 使用 outer 后元素需要重新查询
protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${operation.id}"]`).forEach((itemElement: HTMLElement) => {
mathRender(itemElement);
});
if (index === 0) {
focusBlock(protyle.wysiwyg.element.querySelector(`[data-node-id="${operation.id}"]`), protyle.wysiwyg.element, true);
}
});
transaction(protyle, response.data.doOperations, response.data.undoOperations);
});
Expand Down

0 comments on commit 17d2a16

Please sign in to comment.