我坚持在jQuery UI上进行CKEditor内联编辑工作,特别是在Tabs上。有谁知道如何使它工作?是否有任何插件可以使CKEditor在jQuery UI上运行?
答案 0 :(得分:1)
今天早上我一直在努力解决同样的问题,但我找到了解决办法。
var objCKeditor = new Object({
config: base_url + "library/applications/ckeditor/config.simple.js"
});
var objTab = new Object({
active: false
});
CKEDITOR.disableAutoInline = true;
// Activate your editors when the tabs themselves are activated.
$( ".navigation-tabs" ).on( "tabsactivate", function( event, ui ) {
// Find which tab has been chosen by the user.
objTab.chosen = $(this).tabs('option', 'active');
// Only initialize the editors once...
if ( (objTab.chosen == 3) && (objTab.active == false) ) {
// Loop through the editors.
$( 'div.link-bookmark-comment').each( function() {
// Find the ID for the editor.
objCKeditor.editor = $(this).attr('id');
// ... which is facilitated by this boolean.
objTab.active = true;
CKEDITOR.inline( objCKeditor.editor, { customConfig: objCKeditor.config } );
});
}
} );
因此,看起来CKEditor似乎不喜欢放在标签或最初隐藏的任何对象中。