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",
|
"katex": "^0.16.8",
|
||||||
"mdast-util-from-markdown": "^1.3.0",
|
"mdast-util-from-markdown": "^1.3.0",
|
||||||
"pdf-lib": "^1.17.1",
|
"pdf-lib": "^1.17.1",
|
||||||
"quill": "^2.0.2",
|
"quill": "^2.0.3",
|
||||||
"tern": "^0.24.3",
|
"tern": "^0.24.3",
|
||||||
"uuid": "^9.0.0",
|
"uuid": "^9.0.0",
|
||||||
"ws": "^7.5.9",
|
"ws": "^7.5.9",
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
"katex": "^0.16.8",
|
"katex": "^0.16.8",
|
||||||
"mdast-util-from-markdown": "^1.3.0",
|
"mdast-util-from-markdown": "^1.3.0",
|
||||||
"pdf-lib": "^1.17.1",
|
"pdf-lib": "^1.17.1",
|
||||||
"quill": "^2.0.2",
|
"quill": "^2.0.3",
|
||||||
"tern": "^0.24.3",
|
"tern": "^0.24.3",
|
||||||
"uuid": "^9.0.0",
|
"uuid": "^9.0.0",
|
||||||
"ws": "^7.5.9",
|
"ws": "^7.5.9",
|
||||||
|
|||||||
@ -376,10 +376,9 @@ class RichText {
|
|||||||
// 获取当前正在编辑的内容
|
// 获取当前正在编辑的内容
|
||||||
getEditText() {
|
getEditText() {
|
||||||
// https://github.com/slab/quill/issues/4509
|
// https://github.com/slab/quill/issues/4509
|
||||||
return this.quill
|
return this.quill.container.firstChild.innerHTML.replaceAll(/ +/g, match =>
|
||||||
.getSemanticHTML()
|
' '.repeat(match.length)
|
||||||
.replaceAll(/ +/g, match => ' '.repeat(match.length))
|
)
|
||||||
// return this.quill.container.firstChild.innerHTML
|
|
||||||
// 去除ql-cursor节点
|
// 去除ql-cursor节点
|
||||||
// https://github.com/wanglin2/mind-map/commit/138cc4b3e824671143f0bf70e5c46796f48520d0
|
// https://github.com/wanglin2/mind-map/commit/138cc4b3e824671143f0bf70e5c46796f48520d0
|
||||||
// https://github.com/wanglin2/mind-map/commit/0760500cebe8ec4e8ad84ab63f877b8b2a193aa1
|
// https://github.com/wanglin2/mind-map/commit/0760500cebe8ec4e8ad84ab63f877b8b2a193aa1
|
||||||
@ -495,7 +494,8 @@ class RichText {
|
|||||||
'color',
|
'color',
|
||||||
'background',
|
'background',
|
||||||
'font',
|
'font',
|
||||||
'size'
|
'size',
|
||||||
|
'formula'
|
||||||
], // 明确指定允许的格式,不包含有序列表,无序列表等
|
], // 明确指定允许的格式,不包含有序列表,无序列表等
|
||||||
theme: 'snow'
|
theme: 'snow'
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user