mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
This commit is contained in:
parent
049b4d4b4b
commit
1629db0fdc
1 changed files with 2 additions and 1 deletions
|
|
@ -177,7 +177,8 @@ export class Protyle {
|
|||
} else {
|
||||
onTransaction(this.protyle, item, false);
|
||||
// 反链面板移除元素后,文档为空
|
||||
if (this.protyle.wysiwyg.element.childElementCount === 0 && this.protyle.block.parentID) {
|
||||
if (this.protyle.wysiwyg.element.childElementCount === 0 && this.protyle.block.parentID &&
|
||||
!(item.action === "delete" && typeof item.data?.createEmptyParagraph === "boolean" && !item.data.createEmptyParagraph)) {
|
||||
const newID = Lute.NewNodeID();
|
||||
const emptyElement = genEmptyElement(false, false, newID);
|
||||
this.protyle.wysiwyg.element.append(emptyElement);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue