修复纯文本复制的BUG

This commit is contained in:
jacky 2024-05-17 14:36:54 +08:00
parent 9c40455709
commit 8984955415
1 changed files with 3 additions and 1 deletions

View File

@ -76,11 +76,12 @@ const handleCreated = (editor) => {
}
const customPaste = (editor, event, callback) => {
console.log(event)
//
loadingShow.value = true
let htmlData = event.clipboardData.getData('text/html') // html
// console.log(htmlData)
console.log(htmlData)
let rtfData = event.clipboardData.getData('text/rtf') // html
// console.log('-------------- rtfData --------------', rtfData)
@ -121,6 +122,7 @@ const customPaste = (editor, event, callback) => {
callback(false)
})
} else {
editor.dangerouslyInsertHtml(htmlData);
loadingShow.value = false
callback(false)
}