Skip to content

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

:art: Improve HTML clipping https://github.com/siyuan-note/siyuan/issues/14460

Daniel85c4910183c7
diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts
index 1b269a5ab4..40afcb1d88 100644
--- a/app/src/protyle/util/paste.ts
+++ b/app/src/protyle/util/paste.ts
@@ -466,7 +466,7 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
isHTML = true;
}
- if (textPlain && "" !== textPlain.trim() && (textHTML.startsWith("<span") || textHTML.startsWith("<br"))) {
+ if (textPlain && "" !== textPlain.trim() && (textHTML.startsWith("<span") || textHTML.startsWith("<br")) && 0 > textHTML.indexOf("class=\"katex")) {
// 豆包复制粘贴问题 https://github.com/siyuan-note/siyuan/issues/13265 https://github.com/siyuan-note/siyuan/issues/14313
isHTML = false;
}