This commit is contained in:
parent
4b9ecb5f63
commit
4f2bca7e05
1 changed files with 2 additions and 2 deletions
|
@ -182,8 +182,8 @@ const moveTo = async (protyle: IProtyle, sourceElements: Element[], targetElemen
|
|||
action: "insert",
|
||||
id: copyId,
|
||||
data: copyElement.outerHTML,
|
||||
previousID: position === "afterend" ? targetId : item.previousElementSibling?.getAttribute("data-node-id"), // 不能使用常量,移动后会被修改
|
||||
parentID: item.parentElement?.getAttribute("data-node-id") || protyle.block.parentID || protyle.block.rootID,
|
||||
previousID: position === "afterend" ? targetId : copyElement.previousElementSibling?.getAttribute("data-node-id"), // 不能使用常量,移动后会被修改
|
||||
parentID: copyElement.parentElement?.getAttribute("data-node-id") || protyle.block.parentID || protyle.block.rootID,
|
||||
});
|
||||
} else {
|
||||
tempTargetElement.insertAdjacentElement(position, item);
|
||||
|
|
Loading…
Add table
Reference in a new issue