如何将后端返回的富文本内容再回填到editor中?
发布于 5 年前 作者 pingliao 4608 次浏览 来自 官方Issues

前端界面的富文本内容提交了,如何将后端返回的富文本内容再回填到editor中,以及展示到详情页中?

2 回复

一直渲染失败是为什么?

bindready 编辑器初始化完成时触发

EditorContext.setContents(Object object)

onEditorReady(description) {

const that = this

that.createSelectorQuery().select(’#editor’).context(function (res) {

that.editorCtx = res.context

if (!res) return

that.editorCtx.setContents({

html: description ? description : ’ ',

success: function (res) {

console.log(“渲染成功”)

},

fail: function (err) {

console.log(“渲染失败”)

}

})

}).exec()

回到顶部