mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-17 22:08:25 +08:00
Fix:修复非富文本模式下文本编辑时不能粘贴<a格式的文本的问题
This commit is contained in:
@@ -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)
|
||||
// 去除换行
|
||||
|
||||
Reference in New Issue
Block a user