Vanessa 2025-03-13 21:45:54 +08:00
parent 8d298edf5a
commit cd81d9c1aa

View file

@ -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");