onEditorReady() {
let that = this;
// 报错: TypeError: Cannot read property 'context' of null
uni.createSelectorQuery().select('#editor').context(function (res) {
that.editorCtx = res.context;
}).exec();
},
// 改成
onEditorReady() {
let that = this;
this.createSelectorQuery().select('#editor').context(function (res) {
that.editorCtx = res.context;
}).exec();
},