ueditor:Cannot read property 'offsetWidth' of null


我自己出现这个问题的时候是这样的:

我先是在页面上这样引用ueditor:

<script id="editor_4" type="text/plain" style="width:100%;height:500px;"></script>

然后实例化:

var ue4 = UE.getEditor('editor_4');

所以,页面上成功出现了一个编辑器的界面,但是在获取编辑器里面的值的时候,就报错了:

Cannot read property 'offsetWidth' of null 

因为,我是这样写的:

var ProjectEnvironmental =  UE.getEditor('ue4').getAllHtml()

错误的原因就是,我在UE.getEditor('ue4'),里面的值不是ue4,而是那个id,editor_4


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM