This commit is contained in:
parent
ceb9aef1d6
commit
17d2a16a94
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue