dialog在关闭时需要销毁ueditor创建的对象,再次打开时重新渲染编辑器,参考代码: 页面: <textare class="ueditor" id="content" ex-id="content"></textarea> JavaScript代码: $('#dd').dialog({ onLoad:function(){ if($('textarea.ueditor').length > 0){ $('textarea.ueditor').each(function(){ var id = $(this).attr('id'); UE.getEditor(id, UeditorOptions); }); } }, onClose:function(){ //销毁所有的ueditor if($('textarea.ueditor').length > 0 && typeof (UE) !== "undefined"){ $('textarea.ueditor').each(function(){ UE.getEditor($(this).attr('ex-id')).destroy(); }); } } });
dialog在关闭时需要销毁ueditor创建的对象,再次打开时重新渲染编辑器,参考代码:
页面:
JavaScript代码: