소스 검색

:art: fix https://github.com/siyuan-note/siyuan/issues/6807

Vanessa 2 년 전
부모
커밋
accbeba593
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      app/src/protyle/util/paste.ts

+ 3 - 0
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('<meta charset="utf-8">', "");
                 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")) {