我試圖在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