Fix:修复非富文本模式下文本编辑时不能粘贴<a格式的文本的问题
This commit is contained in:
parent
f8f126e8de
commit
dde085b54e
@ -1208,6 +1208,8 @@ export const handleInputPasteText = (e, text) => {
|
|||||||
if (!selection.rangeCount) return
|
if (!selection.rangeCount) return
|
||||||
selection.deleteFromDocument()
|
selection.deleteFromDocument()
|
||||||
text = text || e.clipboardData.getData('text')
|
text = text || e.clipboardData.getData('text')
|
||||||
|
// 转义特殊字符
|
||||||
|
text = htmlEscape(text)
|
||||||
// 去除格式
|
// 去除格式
|
||||||
text = getTextFromHtml(text)
|
text = getTextFromHtml(text)
|
||||||
// 去除换行
|
// 去除换行
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user