Skip to content

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

:bug: https://github.com/siyuan-note/siyuan/issues/6218

Vanessaa5af985396f9
diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts
index 4dd061c48a..fb4db88574 100644
--- a/app/src/protyle/wysiwyg/index.ts
+++ b/app/src/protyle/wysiwyg/index.ts
@@ -1093,7 +1093,7 @@ export class WYSIWYG {
}
}
protyle.hint.render(protyle);
- event.clipboardData.setData("text/plain", protyle.lute.BlockDOM2StdMd(html));
+ event.clipboardData.setData("text/plain", protyle.lute.BlockDOM2StdMd(html).trimEnd()); // 需要 trimEnd,否则 \n 会导致 https://github.com/siyuan-note/siyuan/issues/6218
event.clipboardData.setData("text/html", Constants.ZWSP + html);
});