diff --git a/src/components/richtext/rich-edit.vue b/src/components/richtext/rich-edit.vue index 7d1c586..63349e3 100644 --- a/src/components/richtext/rich-edit.vue +++ b/src/components/richtext/rich-edit.vue @@ -76,12 +76,15 @@ const handleCreated = (editor) => { } const customPaste = (editor, event, callback) => { - console.log(event) + // console.log(event) // 显示蒙版 loadingShow.value = true - let htmlData = event.clipboardData.getData('text/html') // 获取粘贴的 html - console.log(htmlData) + // console.log(htmlData) + if (htmlData == "") { + htmlData = event.clipboardData.getData('text/plain') // 获取粘贴的 html + // console.log(htmlData) + } let rtfData = event.clipboardData.getData('text/rtf') // 获取粘贴的 html // console.log('-------------- rtfData --------------', rtfData)