editor的 insertImage API,插入图片后会多了个<p><br></p>?
发布于 5 年前 作者 jyao 9620 次浏览 来自 官方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 回复

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

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

回到顶部