mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
This commit is contained in:
parent
e99c37a0e1
commit
904b9faf8c
2 changed files with 8 additions and 4 deletions
|
|
@ -375,18 +375,21 @@ export class Outline extends Model {
|
|||
}
|
||||
let needReload = false;
|
||||
const ops = data.data.sources[0];
|
||||
ops.doOperations.forEach((item: IOperation) => {
|
||||
ops.doOperations.find((item: IOperation) => {
|
||||
if ((item.action === "update" || item.action === "insert") &&
|
||||
(item.data.indexOf('data-type="NodeHeading"') > -1 || item.data.indexOf(`<div contenteditable="true" spellcheck="${window.siyuan.config.editor.spellcheck}"><wbr></div>`) > -1)) {
|
||||
needReload = true;
|
||||
return true
|
||||
} else if (item.action === "delete" || item.action === "move") {
|
||||
needReload = true;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (ops.undoOperations) {
|
||||
ops.undoOperations.forEach((item: IOperation) => {
|
||||
if (!needReload && ops.undoOperations) {
|
||||
ops.undoOperations.find((item: IOperation) => {
|
||||
if (item.action === "update" && item.data.indexOf('data-type="NodeHeading"') > -1) {
|
||||
needReload = true;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue