I am trying to implement CKEditor inside a jQuery UI dialog when the dialog is opened the first time it works perfectly.
When I open the dialog a second time, the text area as "style: hidden" and the editor does not load?
Dialog
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');
on my admin page I am waiting for the dialog to load.
$('.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();
});
source
share