From 0a2e4e7c1408ae3da7393303a1426c97116bf47d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A1=97=E8=A7=92=E5=B0=8F=E6=9E=97?= <1013335014@qq.com> Date: Thu, 5 Dec 2024 09:56:52 +0800 Subject: [PATCH] =?UTF-8?q?Feat=EF=BC=9A=E5=8E=BB=E9=99=A4=E5=AF=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E6=8F=92=E4=BB=B6=E4=B8=AD=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E6=9C=80=E5=90=8E=E4=B8=80=E8=A1=8C=E7=A9=BA=E8=A1=8C=E7=9A=84?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simple-mind-map/src/plugins/RichText.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simple-mind-map/src/plugins/RichText.js b/simple-mind-map/src/plugins/RichText.js index 21ebb457..3087044d 100644 --- a/simple-mind-map/src/plugins/RichText.js +++ b/simple-mind-map/src/plugins/RichText.js @@ -373,13 +373,13 @@ class RichText { // 获取当前正在编辑的内容 getEditText() { - let html = this.quill.container.firstChild.innerHTML + return this.quill.container.firstChild.innerHTML // 去除ql-cursor节点 // https://github.com/wanglin2/mind-map/commit/138cc4b3e824671143f0bf70e5c46796f48520d0 // https://github.com/wanglin2/mind-map/commit/0760500cebe8ec4e8ad84ab63f877b8b2a193aa1 // html = removeHtmlNodeByClass(html, '.ql-cursor') // 去除最后的空行 - return html.replace(/
<\/p>$/, '')
+ // return html.replace(/
<\/p>$/, '')
}
// 给html字符串中的节点样式按样式名首字母排序