Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

config.js doesn't work for CKEditor

I have the following in my config.js for CKEditor:

CKEDITOR.editorConfig = function( config )
{
    config.toolbar =
    [
        [ 'Source', '-', 'Bold', 'Italic' ]
    ];
    // config.toolbar_Basic =
    // [
    //     [ 'Source', '-', 'Bold', 'Italic' ]
    // ];
    // config.toolbar = 'Basic';
}

The editor is still showing with all the options in the toolbar.

It is also loading the JS files in the right order:

<script src="/assets/ckeditor/init.js?body=1" type="text/javascript"></script>
<script src="/assets/ckeditor/ckeditor.js?body=1" type="text/javascript"></script>
<script src="/assets/ckeditor/config.js?body=1" type="text/javascript"></script>

So I am not sure what is happening here. Any thoughts?

Also important to note that I tried the alternative way of declaring that Basic toolbar (see the commented out code in the snippet above) and it didn't work either.

After every change, I restart my server.

like image 322
marcamillion Avatar asked Dec 30 '12 22:12

marcamillion


1 Answers

How do you load you ckeditor in place of the textarea? Maybe the toolbar is overridden there.

like image 77
Jeroen K Avatar answered Oct 07 '22 01:10

Jeroen K