Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/12294

Vanessaa0f49da336a5
diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts
index 74a0d74ad3..1b605b4940 100644
--- a/app/src/protyle/util/paste.ts
+++ b/app/src/protyle/util/paste.ts
@@ -411,6 +411,9 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
e.classList.remove("protyle-wysiwyg--select", "protyle-wysiwyg--hl");
e.setAttribute("updated", newId.split("-")[0]);
e.removeAttribute("refcount");
+ e.querySelector(".protyle-attr--av")?.remove();
+ e.removeAttribute("custom-avs");
+ e.removeAttribute("av-names");
isBlock = true;
});
if (nodeElement.classList.contains("table")) {
diff --git a/app/src/protyle/wysiwyg/commonHotkey.ts b/app/src/protyle/wysiwyg/commonHotkey.ts
index 5bbe922279..11c4d733bb 100644
--- a/app/src/protyle/wysiwyg/commonHotkey.ts
+++ b/app/src/protyle/wysiwyg/commonHotkey.ts
@@ -318,6 +318,9 @@ export const duplicateBlock = async (nodeElements: Element[], protyle: IProtyle)
tempElement.setAttribute("updated", newId.split("-")[0]);
tempElement.removeAttribute("refcount");
tempElement.lastElementChild.querySelector(".protyle-attr--refcount")?.remove();
+ tempElement.lastElementChild.querySelector(".protyle-attr--av")?.remove();
+ tempElement.removeAttribute("custom-avs");
+ tempElement.removeAttribute("av-names");
tempElement.querySelectorAll("[data-node-id]").forEach(childItem => {
const subNewId = Lute.NewNodeID();
childItem.setAttribute("data-node-id", subNewId);
@@ -326,6 +329,9 @@ export const duplicateBlock = async (nodeElements: Element[], protyle: IProtyle)
childItem.setAttribute("updated", subNewId.split("-")[0]);
childItem.removeAttribute("refcount");
childItem.lastElementChild.querySelector(".protyle-attr--refcount")?.remove();
+ childItem.lastElementChild.querySelector(".protyle-attr--av")?.remove();
+ childItem.removeAttribute("custom-avs");
+ childItem.removeAttribute("av-names");
});
if (typeof starIndex === "number") {
const orderIndex = starIndex + index + 1;
@@ -356,11 +362,17 @@ export const duplicateBlock = async (nodeElements: Element[], protyle: IProtyle)
subItem.setAttribute("data-node-id", Lute.NewNodeID());
subItem.removeAttribute(Constants.CUSTOM_RIFF_DECKS);
subItem.removeAttribute("refcount");
+ subItem.lastElementChild.querySelector(".protyle-attr--av")?.remove();
+ subItem.removeAttribute("custom-avs");
+ subItem.removeAttribute("av-names");
});
const newChildId = Lute.NewNodeID();
childItem.setAttribute("data-node-id", newChildId);
childItem.removeAttribute(Constants.CUSTOM_RIFF_DECKS);
childItem.removeAttribute("refcount");
+ childItem.lastElementChild.querySelector(".protyle-attr--av")?.remove();
+ childItem.removeAttribute("custom-avs");
+ childItem.removeAttribute("av-names");
doOperations.push({
context: {
ignoreProcess: "true"