因为需要把ueditor编辑的整个html保存到数据库,app需要展示。
但这样ueditor的方式就无法回显。
UE.getEditor('editor').execCommand('insertHtml', value);
通过以上方式会提示错误
ueditor.all.min.js:11 Uncaught TypeError: Cannot read property 'getRange' of undefined
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
先$("#editor").html(value),然后UE.getEditor('editor')生成编辑器实例,因为生成编辑器是异步的