使用UEditor的setContent的时候报错,报错代码以下 Uncaught TypeError: Cannot set property 'innerHTML' of undefined 错javascript
缘由是没有等UEditor建立完成就使用UEditor的setContent函数了,能够经过以下代码解决 方法一:java
ueditor.addListener("ready", function () { ueditor.setContent('UEditor报错TypeError: me.body is undefined'); });
方法二:
函数
ueditor.ready(function() { ueditor.setContent('UEditor报错TypeError: me.body is undefined'); });