|
@@ -43,16 +43,9 @@ Component({
|
|
|
_onEditorReady: async function () {
|
|
|
const that = this;
|
|
|
that.createSelectorQuery().select('#editor').context(function (res) {
|
|
|
- that.editorCtx = res.context
|
|
|
- let html = that;
|
|
|
- if (html) {
|
|
|
- that.editorCtx.setContents({
|
|
|
- html: html,
|
|
|
- success: (res) => {
|
|
|
- },
|
|
|
- fail: (res) => { console.log(res) }
|
|
|
- })
|
|
|
- }
|
|
|
+ that.editorCtx = res.context;
|
|
|
+ let html = that.data.name;
|
|
|
+ if (html) that.editorCtx.setContents({ html })
|
|
|
}).exec()
|
|
|
},
|
|
|
//插入图片
|