Fix:修复非富文本模式下文本编辑时不能粘贴<a格式的文本的问题

This commit is contained in:
街角小林
2024-12-20 17:02:25 +08:00
parent f8f126e8de
commit dde085b54e

View File

@@ -1208,6 +1208,8 @@ export const handleInputPasteText = (e, text) => {
if (!selection.rangeCount) return
selection.deleteFromDocument()
text = text || e.clipboardData.getData('text')
// 转义特殊字符
text = htmlEscape(text)
// 去除格式
text = getTextFromHtml(text)
// 去除换行