🎨 Improve Paste and Paste as plain text Fix https://github.com/siyuan-note/siyuan/issues/8289

This commit is contained in:
Liang Ding 2023-05-17 21:48:01 +08:00
parent dd6bfbe4ba
commit aef5130436
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
7 changed files with 14 additions and 9 deletions

View file

@ -50,9 +50,9 @@ export const pasteAsPlainText = async (protyle: IProtyle) => {
}
/// #endif
if (localFiles.length === 0) {
// https://github.com/siyuan-note/siyuan/issues/8010
// Inline-level elements support pasted as plain text https://github.com/siyuan-note/siyuan/issues/8010
navigator.clipboard.readText().then(textPlain => {
insertHTML(protyle.lute.BlockDOM2Content(protyle.lute.Md2BlockDOM(textPlain)), protyle);
insertHTML(protyle.lute.BlockDOM2EscapeMarkerContent(protyle.lute.Md2BlockDOM(textPlain)), protyle);
});
}
};