修复纯文本复制的BUG
This commit is contained in:
parent
9c40455709
commit
8984955415
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue