0

ckEditor not show up (java project)

asked 2016-03-07 22:02:58 +0800

Saidamin gravatar image Saidamin
1

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?

delete flag offensive retag edit

1 Answer

Sort by » oldest newest most voted
0

answered 2016-05-13 05:11:43 +0800

MDuchemin gravatar image MDuchemin
1336 1 4
ZK Team

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

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
2 followers

RSS

Stats

Asked: 2016-03-07 22:02:58 +0800

Seen: 37 times

Last updated: May 13 '16

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More