带有JQuery UI对话框的CKEditor-不会再次显示

带有JQuery UI对话框的CKEditor-不会再次显示,jquery,ckeditor,Jquery,Ckeditor,我试图在jQueryUI对话框中实现CKEditor,当该对话框第一次打开时,它工作正常 当我第二次打开对话框时,文本区域显示为“style:hidden”,编辑器没有加载 对话 MyApp.Dialog = $('<div></div>'); MyApp.Dialog .dialog({ modal: true, autoOpen: false, title: tit

我试图在jQueryUI对话框中实现CKEditor,当该对话框第一次打开时,它工作正常

当我第二次打开对话框时,文本区域显示为“style:hidden”,编辑器没有加载

对话

MyApp.Dialog = $('<div></div>');
        MyApp.Dialog
        .dialog({
            modal: true,
            autoOpen: false,
            title: title,
            width: width,
            height: height,
            close:function(){
                $(this).find('textarea').ckeditorGet().destroy();
            },
            buttons: {
                'OK': function() {
                    form = $(this).find('form');
                    if (form.validate().form() == true) {
                        MyApp.submitFormWithAjax(form, $(this));
                    } else {
                        return false;
                    }
                },
                Cancel: function() {
                    $(this).dialog('close');
                }
            }
        });

        MyApp.Dialog.load(url, function() {
            EventManager.publish('showFormDialogLoaded');
        });

        MyApp.Dialog.dialog('open');

脚本文件未加载或与其他一些脚本(如jquery UI脚本)冲突

我也有同样的问题,但现在它对我有效了

必须在每个对话框构造上执行此操作(创建并销毁ckeditor):


当我第一次打开对话框时,一切都正常,如果我再次单击链接,对话框将打开,但编辑器丢失。对于ckeditor v4.3,我没有遇到编辑器第二次未启动的问题,但工具栏的下拉元素第二次不起作用。这个解决方案解决了这个问题。谢谢
$('.admin-create-article').click(function(event) {
       MyApp.showFormDialog($(this).attr('href'), 'Neuer Artikel', 700, 630);
       EventManager.subscribe('showFormDialogLoaded', function() {
             $('.editor').ckeditor( function() {}, { skin : 'v2' } );
       });
       event.preventDefault();
 });
if  (CKEDITOR.instances.editorD != null && CKEDITOR.instances.editorD != 'undefined')
     {
       CKEDITOR.instances.editorD.destroy();
     }

      CKEDITOR.replace( 'editorD',
      {
       language : 'fr',
       toolbar_Mytoolbardata :
       [
        ['Bold','Italic','Underline','Strike'],
        ['FontName','FontSize'],
        ['TextColor']// No comma for the last row.
       ],
       toolbar : 'Mytoolbardata',
       skin: 'v2',
       width : 403,      
       height : 25,
       disableObjectResizing : true,
       resize_enabled : false,
       shiftEnterMode : CKEDITOR.ENTER_BR,
       toolbarCanCollapse : false,
       forcePasteAsPlainText : true 
      });