調用setContent方法後,文本可以顯示出來,但會報Uncaught ReferenceError: layedit is not defined(看源碼是該方法最後調用了layedit.sync(index))函數
須要把layedit.js裏的setContent 函數的this
layedit.sync(index));
改爲源碼
this.sync(index));