mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-21 10:27:44 +08:00
fix: 修复已设置了字体样式的节点,在清空后再输入文本,节点的字体样式变成了主题样式的bug
This commit is contained in:
parent
4e6688e4e0
commit
7d101123d6
@ -540,8 +540,8 @@ class RichText {
|
||||
// 如果编辑过程中删除所有字符,那么会丢失主题的样式
|
||||
if (len <= 0 || (len === 1 && contents.ops[0].insert === '\n')) {
|
||||
this.lostStyle = true
|
||||
// 需要删除节点的样式数据
|
||||
this.syncFormatToNodeConfig(null, true)
|
||||
// // 需要删除节点的样式数据
|
||||
// this.syncFormatToNodeConfig(null, true)
|
||||
} else if (this.lostStyle && !this.isCompositing) {
|
||||
// 如果处于样式丢失状态,那么需要进行格式化加回样式
|
||||
this.setTextStyleIfNotRichText(this.node)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user