-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello. Hope someone can help me.
I am using 3.5.2.0 version and in function I am calling ckEditor as following:
private CKeditor ck;
....
Groupbox classBox = new Groupbox();
ck = new CKeditor();
ck.setCustomConfigurationsPath("/config.js");
ck.setToolbar("MyToolbar");
classBox.appendChild(ck);
....
if( dynamicDocument.getDocument() != null ) {
ck.setValue( new String(dynamicDocument.getDocument()) );
}
The content of js file is following:
var customPluginsRoot = '/editor/plugins/';
CKEDITOR.plugins.addExternal('mergefield',customPluginsRoot+'mergefield/', 'plugin.js');
CKEDITOR.editorConfig = function(config) {
config.extraPlugins = 'mergefield';
config.resize_enabled = false;
config.toolbar = 'MyToolbar';
config.toolbar_MyToolbar = [
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Cut','Copy','Paste','PasteText','PasteWord'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['OrderedList','UnorderedList','-','Outdent','Indent'],
['Link','Unlink','Anchor'],
['Print','SpellCheck','Source'],
'/',
['Style','FontFormat','FontName','FontSize'],
['TextColor','BGColor'],
['Image','Table','Rule','SpecialChar','PageBreak','-','Maximize','MergeField']
] ;
};
But when I execute application the ckEditor is not showing up. Any idea what I am missing?
Apparently CKedior 3 had some issues with custom toolbars https://github.com/galetahub/ckeditor/issues/173
It might be easier to switch to ckeditor 4 (using ckez 4.4.6.3), and create your toolbar with the toolbar configuration tool available here: http://ckeditor.com/latest/samples/toolbarconfigurator/index.html
Asked: 2016-03-07 22:02:58 +0800
Seen: 37 times
Last updated: May 13 '16