🎨 Improve the pasting of selected text in PDF rectangular annotation https://github.com/siyuan-note/siyuan/issues/11629

This commit is contained in:
Daniel 2024-08-07 23:36:06 +08:00
parent 9f7c8c1265
commit 9db7b49037
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -241,6 +241,10 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
files = event.dataTransfer.items;
}
}
// Improve the pasting of selected text in PDF rectangular annotation https://github.com/siyuan-note/siyuan/issues/11629
textPlain = textPlain.replace(/\r\n|\r|\u2028|\u2029/g, "\n");
/// #if !BROWSER
// 不再支持 PC 浏览器 https://github.com/siyuan-note/siyuan/issues/7206
if (!siyuanHTML && !textHTML && !textPlain && ("clipboardData" in event)) {