Vanessa 2025-10-10 13:26:01 +08:00
parent 2baa476b51
commit a6798192ae
2 changed files with 10 additions and 0 deletions

View file

@ -555,4 +555,8 @@ export const insertHTML = (html: string, protyle: IProtyle, isBlock = false,
wbrElement.remove();
}
transaction(protyle, doOperation, undoOperation);
// 复制容器块中包含折叠标题块
protyle.wysiwyg.element.querySelectorAll("[parent-heading]").forEach(item => {
item.remove();
});
};

View file

@ -242,6 +242,9 @@ const promiseTransaction = () => {
// blockRender(protyle, item);
// }
// });
protyle.wysiwyg.element.querySelectorAll("[parent-heading]").forEach(item => {
item.remove();
});
}
});
@ -852,6 +855,9 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo:
wbrElement.remove();
}
});
protyle.wysiwyg.element.querySelectorAll("[parent-heading]").forEach(item => {
item.remove();
});
return;
}
if (operation.action === "append") {