mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-21 10:27:44 +08:00
Fix:修复添加数学公式报错的问题
This commit is contained in:
parent
3f002ce2ee
commit
5a291b4a5f
2
simple-mind-map/package-lock.json
generated
2
simple-mind-map/package-lock.json
generated
@ -15,7 +15,7 @@
|
||||
"katex": "^0.16.8",
|
||||
"mdast-util-from-markdown": "^1.3.0",
|
||||
"pdf-lib": "^1.17.1",
|
||||
"quill": "^2.0.2",
|
||||
"quill": "^2.0.3",
|
||||
"tern": "^0.24.3",
|
||||
"uuid": "^9.0.0",
|
||||
"ws": "^7.5.9",
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
"katex": "^0.16.8",
|
||||
"mdast-util-from-markdown": "^1.3.0",
|
||||
"pdf-lib": "^1.17.1",
|
||||
"quill": "^2.0.2",
|
||||
"quill": "^2.0.3",
|
||||
"tern": "^0.24.3",
|
||||
"uuid": "^9.0.0",
|
||||
"ws": "^7.5.9",
|
||||
|
||||
@ -376,10 +376,9 @@ class RichText {
|
||||
// 获取当前正在编辑的内容
|
||||
getEditText() {
|
||||
// https://github.com/slab/quill/issues/4509
|
||||
return this.quill
|
||||
.getSemanticHTML()
|
||||
.replaceAll(/ +/g, match => ' '.repeat(match.length))
|
||||
// return this.quill.container.firstChild.innerHTML
|
||||
return this.quill.container.firstChild.innerHTML.replaceAll(/ +/g, match =>
|
||||
' '.repeat(match.length)
|
||||
)
|
||||
// 去除ql-cursor节点
|
||||
// https://github.com/wanglin2/mind-map/commit/138cc4b3e824671143f0bf70e5c46796f48520d0
|
||||
// https://github.com/wanglin2/mind-map/commit/0760500cebe8ec4e8ad84ab63f877b8b2a193aa1
|
||||
@ -495,7 +494,8 @@ class RichText {
|
||||
'color',
|
||||
'background',
|
||||
'font',
|
||||
'size'
|
||||
'size',
|
||||
'formula'
|
||||
], // 明确指定允许的格式,不包含有序列表,无序列表等
|
||||
theme: 'snow'
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user