微信小程序执行EditorContext.clear 后会插入一个空行
发布于 5 年前 作者 tao56 7500 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)

微信小程序+EditorContext.clear 后会插入一个空行

  • 预期表现
  • 复现路径
  • 提供一个最简复现 Demo

onEditorReady() {

const that = this

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

that.editorCtx = res.context

}).exec()

},

//执行两次以上此方法就会插入一个空行

insertText(){

this.editorCtx.clear({

success: function() {

that.editorCtx.insertText({

text: “aaaaaaaaaaaaaaaaaaaaa”

});

}

});

}

1 回复
回到顶部