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/14306

Vanessacd81d9c1aae0
diff --git a/app/src/protyle/header/Title.ts b/app/src/protyle/header/Title.ts
index 8b3bd80b25..15965ef19c 100644
--- a/app/src/protyle/header/Title.ts
+++ b/app/src/protyle/header/Title.ts
@@ -49,6 +49,12 @@ export class Title {
// 不能使用 range.insertNode,否则无法撤销
let text = event.clipboardData.getData("text/siyuan");
if (text) {
+ try {
+ JSON.parse(text);
+ text = event.clipboardData.getData("text/plain");
+ } catch (e) {
+ // 不为数据库,保持 text 不变
+ }
text = protyle.lute.BlockDOM2Content(text);
} else {
text = event.clipboardData.getData("text/plain");