富文本编辑器editor的 insertImage API,如何去掉自动多出的空行?

发布于 6 年前作者 xiulan571018 次浏览最后编辑 6 年前来自 issues

富文本编辑器editor的 insertImage API,插入图片后会多了个<p><br></p>

let that = this;
this.editorCtx.insertImage({
    src: "https://www.hongbk.club/emotion/"+this.emotion[index].name+".png",
    extClass: 'emoji_img',
    success() {
        that.editorCtx.getContents({
            success(res) {
                console.log(res.html)
            }
        }) 
    }
})

打印的结果:

2 回复
ping80
ping801 楼6 年前

谢邀,没玩过,replace不行吗

leihou
leihou2 楼5 年前

移动端插入图片后,为方便用户跳到下一行,insertImage 后会插入一个空行,这个之前你不是问过吗。。应该去不掉