使用easeui dialog弹出框中使用CKeditor多次加载后无法编辑问题

问题呈现:弹出框页面

<tr class="addtr">
                    <th>内容</th>
                    <td>
                        <!-- <textarea rows="15" cols="50" id="content" name="content" class="ckeditor">请输入.</textarea> -->
                        <textarea rows="15" cols="50" id="content" name="content" class="ckeditor">请输入.</textarea>
                        <script>
                             var instance = CKEDITOR.instances["content"];
                            if (instance) { CKEDITOR.remove(instance); }
                            //$("#content").ckeditor();
                            CKEDITOR.replace('content');
                        </script>
                    </td>
                </tr>

第一次使用没问题,第二次时编辑器将无法编辑

参考将dialog属性中的Madol设置为false后仍无法解决

最后将弹出页面的script代码放到dialog的onLoad事件内,

''''    
cache : false,
        href : map["href"],
        modal : true,
         onLoad:function(){
             var instance = CKEDITOR.instances["content"];
            if (instance) { CKEDITOR.remove(instance); }
            //$("#content").ckeditor();
            CKEDITOR.replace('content');
        }, 
        buttons : [ {
            text : '保存',
            iconCls : 'icon-ok',
            handler : function() {
                 for ( 
'''''''

问题就不在出现,求大神帮忙解释,多谢!!!

原文地址:https://www.cnblogs.com/fanglorry/p/4611118.html