Skip to content

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

:bug: windows https://github.com/siyuan-note/siyuan/issues/5667

Vanessaf534be17945e
diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts
index 2d6d26ba73..b8faafaea9 100644
--- a/app/src/protyle/util/paste.ts
+++ b/app/src/protyle/util/paste.ts
@@ -107,6 +107,10 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
if (doc.body && doc.body.innerHTML) {
textHTML = doc.body.innerHTML;
}
+ // windows 剪切板
+ if (textHTML.startsWith("\n<!--StartFragment-->") && textHTML.endsWith("<!--EndFragment-->\n\n")) {
+ textHTML = doc.body.innerHTML.trim().replace("<!--StartFragment-->", "").replace("<!--EndFragment-->", "");
+ }
}
textHTML = Lute.Sanitize(textHTML);