Feat:去除移除富文本内容中ql-cursor类名的节点的逻辑,修复文本换行时新增空行不生效的问题

This commit is contained in:
街角小林 2024-05-31 15:56:01 +08:00
parent 3355900bd3
commit 0760500ceb

View File

@ -313,7 +313,7 @@ class RichText {
getEditText() {
let html = this.quill.container.firstChild.innerHTML
// 去除ql-cursor节点
html = removeHtmlNodeByClass(html, '.ql-cursor')
// html = removeHtmlNodeByClass(html, '.ql-cursor')
// 去除最后的空行
return html.replace(/<p><br><\/p>$/, '')
}