Skip to content

Commit cd81d9c

Browse files
committed
🎨 #14306
1 parent 8d298ed commit cd81d9c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/src/protyle/header/Title.ts

+6
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ export class Title {
4949
// 不能使用 range.insertNode,否则无法撤销
5050
let text = event.clipboardData.getData("text/siyuan");
5151
if (text) {
52+
try {
53+
JSON.parse(text);
54+
text = event.clipboardData.getData("text/plain");
55+
} catch (e) {
56+
// 不为数据库,保持 text 不变
57+
}
5258
text = protyle.lute.BlockDOM2Content(text);
5359
} else {
5460
text = event.clipboardData.getData("text/plain");

0 commit comments

Comments
 (0)