Uncaught TypeError: Cannot read property ‘getRange’ of undefined
原因:
ueditor设置已保存的html出错。
解决方法:
把
ueIntroduction.execCommand(‘inserthtml’, itemDto.introduction);
改成
//编辑器赋值
ueIntroduction.ready(function () {
ueIntroduction.execCommand(‘inserthtml’, itemDto.introduction);
});
本文解决了一个关于UEditor在尝试插入已保存的HTML时出现的TypeError问题。通过将直接的execCommand调用修改为在编辑器ready事件中执行,避免了因编辑器未完全初始化而导致的错误。
893

被折叠的 条评论
为什么被折叠?



