Edwin
Edwin

Reputation: 827

CKEditor Defining Custom Toolbar

I am using CKEditor and have defined a custom toolbar in the config.js file.

However, this custom toolbar does not appear when I refresh the page where I have the CKEditor appearing.

Below is my custom toolbar in the config.js file.

CKEDITOR.editorConfig = function( config )
{
    // Define changes to default configuration here. For example:
    // config.language = 'fr';
    // config.uiColor = '#AADC6E';
    config.toolbar = 'Custom';

    config.toolbar_Custom =
    [
        { name: 'document', items : [ 'NewPage','Preview' ] },
        { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
        { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','Scayt' ] },
        { name: 'insert', items : [ 'Image','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'
                 ,'Iframe' ] },
                '/',
        { name: 'styles', items : [ 'Styles','Format' ] },
        { name: 'basicstyles', items : [ 'Bold','Italic','Strike','-','RemoveFormat' ] },
        { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote' ] },
        { name: 'links', items : [ 'Link','Unlink','Anchor' ] },
        { name: 'tools', items : [ 'Maximize','-','About' ] }
    ];
};

Is there anything else that I need to do other than just adding the toolbar to the config file.

Thanks for your time and help.

Upvotes: 9

Views: 9381

Answers (1)

Chris
Chris

Reputation: 1049

There are two things that could be happening. One, your config.js file could be cached, so it's loading the previous file from before your changes were made, in which case you need to either clear your browser cache or hit ctrl-F5 in your browser to fully reload your page. Or two, you're using a combo-loaded (and minified) config.js file, which would mean that you need to run the packaging tool every time you make changes to the file. See this for more info on the packaging tool. Hope that helps!

Upvotes: 7

Related Questions