sproketboy
sproketboy

Reputation: 9452

Why doesn't CKEditor run editorConfig function

I'm trying to specify an editorConfig function to decide if I need to hide certain plugins depending on context. For whatever reason the function is not executing. Any ideas?

Check here:

http://jsfiddle.net/EpokK/B4yGJ/

and add the following:

 CKEDITOR.editorConfig = function( config )
    {
        alert("test");
    };

I tried before and after

CKEDITOR.replace('editor1');

but neither worked.

Any ideas?

TIA

Upvotes: 0

Views: 522

Answers (1)

Reinmar
Reinmar

Reputation: 22023

Did you place that function in the config.js? As I understand you put it in the same file as CKEDITOR.replace() call.

So what happens is that config.js is loaded when you call CKEDITOR.replace() and it overwrites the CKEDITOR.editorConfig property that you set.

What you should do is either putting your config in the config.js file or passing it directly to the CKEDITOR.replace() function.

Read more about configuring CKEditor in the documentation.

Upvotes: 1

Related Questions