富文本編輯器layedit,調用setContent方法會報錯

調用setContent方法後,文本可以顯示出來,但會報Uncaught ReferenceError: layedit is not defined(看源碼是該方法最後調用了layedit.sync(index))函數

 

須要把layedit.js裏的
setContent 函數的this

layedit.sync(index));

改爲源碼

this.sync(index));
相關文章
相關標籤/搜索