fix: 错误的删除了span不为空的节点
This commit is contained in:
parent
946c0af0b0
commit
524843e04b
|
@ -107,6 +107,10 @@ export default class Paste {
|
||||||
}
|
}
|
||||||
// 删除空 span
|
// 删除空 span
|
||||||
while (node.name === 'span' && nodeApi.isEmpty(node)) {
|
while (node.name === 'span' && nodeApi.isEmpty(node)) {
|
||||||
|
const children = node.children();
|
||||||
|
if (children.length > 0 && children.isElement()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
parent = node.parent();
|
parent = node.parent();
|
||||||
node.remove();
|
node.remove();
|
||||||
if (!parent) return;
|
if (!parent) return;
|
||||||
|
|
Loading…
Reference in New Issue