From accbeba593b5983f4e7b7f46db5f936a8838d7ce Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 8 Dec 2022 18:24:14 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/6807 --- app/src/protyle/util/paste.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts index 09397e3be..fd6685f8c 100644 --- a/app/src/protyle/util/paste.ts +++ b/app/src/protyle/util/paste.ts @@ -208,7 +208,10 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven tempElement.innerHTML = textHTML.substr(1).replace('', ""); let isBlock = false; tempElement.querySelectorAll("[data-node-id]").forEach((e) => { + const newId = Lute.NewNodeID(); + e.setAttribute("data-node-id", newId); e.classList.remove("protyle-wysiwyg--select", "protyle-wysiwyg--hl"); + e.setAttribute("updated", newId.split("-")[0]); isBlock = true; }); if (nodeElement.classList.contains("table")) {