我试图在JQuery UI对话框内实现CKEditor,当对话框第一次打开时它完美。CKEditor与JQuery UI对话框 - 不会显示第二次
当我第二次打开对话框时,“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');
我的管理页面上我等待的对话框加载..
$('.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();
});
随着ckeditor v4.3,我没有得到第二次启动编辑器问题的问题,但我得到的工具栏的下拉元素第二次不工作。该解决方案解决了它。谢谢。 – frank 2014-07-10 20:06:00