- 富文本编辑器editor的 insertImage API,如何去掉自动多出的空行?
富文本编辑器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)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}) [代码][代码] [代码][代码]}[代码][代码]})[代码] 打印的结果: [图片]
2019-11-09 - editor的 insertImage API,插入图片后会多了个<p><br></p>?
富文本编辑器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)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}) [代码][代码] [代码][代码]}[代码][代码]})[代码] 打印的结果: [图片]
2019-11-06