Feat:去除移除富文本内容中ql-cursor类名的节点的逻辑,修复文本换行时新增空行不生效的问题
This commit is contained in:
parent
3355900bd3
commit
0760500ceb
@ -313,7 +313,7 @@ class RichText {
|
|||||||
getEditText() {
|
getEditText() {
|
||||||
let html = this.quill.container.firstChild.innerHTML
|
let html = this.quill.container.firstChild.innerHTML
|
||||||
// 去除ql-cursor节点
|
// 去除ql-cursor节点
|
||||||
html = removeHtmlNodeByClass(html, '.ql-cursor')
|
// html = removeHtmlNodeByClass(html, '.ql-cursor')
|
||||||
// 去除最后的空行
|
// 去除最后的空行
|
||||||
return html.replace(/<p><br><\/p>$/, '')
|
return html.replace(/<p><br><\/p>$/, '')
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user