mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 00:38:49 +01:00
This commit is contained in:
parent
8d298edf5a
commit
cd81d9c1aa
1 changed files with 6 additions and 0 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue