editor的 insertImage API,插入图片后会多了个<p><br></p>?

发布于 6 年前作者 jyao9824 次浏览最后编辑 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 回复
fengyan
fengyan1 楼6 年前

移动端插入图片后,为方便用户跳到下一行,insertImage 后会插入一个空行。

hqin
hqin2 楼4 年前

我也遇到这个问题,插入一个图片就自动加一个换行,我连续插入好几个就连续换好几行,这个是不是体验太差了