Fix:修复富文本插件粘贴文本时没有去除默认样式的问题

This commit is contained in:
街角小林 2024-08-19 16:33:35 +08:00
parent 0a6c8fb61c
commit 6bfac34368

View File

@ -13,7 +13,7 @@ import {
nodeRichTextToTextWithWrap
} from '../utils'
import { CONSTANTS } from '../constants/constant'
import Node from '../core/render/node/Node'
import MindMapNode from '../core/render/node/Node'
let extended = false
@ -691,7 +691,7 @@ class RichText {
'textDecoration',
'color'
]
const nodeData = node instanceof Node ? node.getData() : node
const nodeData = node instanceof MindMapNode ? node.getData() : node
for (let i = 0; i < list.length; i++) {
if (nodeData[list[i]] !== undefined) {
return true