mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-21 10:27:44 +08:00
Fix:修复粘贴方式创建新节点时如果粘贴的内容带有<>等html标签符号时新创建的节点内容为空的问题
This commit is contained in:
parent
9915479354
commit
c7b0cbc128
@ -23,7 +23,8 @@ import {
|
||||
getNodeDataIndex,
|
||||
getNodeIndexInNodeList,
|
||||
setDataToClipboard,
|
||||
getDataFromClipboard
|
||||
getDataFromClipboard,
|
||||
htmlEscape
|
||||
} from '../../utils'
|
||||
import { shapeList } from './node/Shape'
|
||||
import { lineStyleProps } from '../../themes/default'
|
||||
@ -885,6 +886,7 @@ class Render {
|
||||
Array.isArray(smmData) ? smmData : [smmData]
|
||||
)
|
||||
} else {
|
||||
text = htmlEscape(text)
|
||||
const textArr = text.split(/\r?\n|(?<!\n)\r/g).filter(item => {
|
||||
return !!item
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user