Reputation: 851
I have config.js file, but I also want to config some buttons dynamically. Here is my code for page:
CKEDITOR.on('instanceReady', function (evt)
{
CKEDITOR.instances.MY_INSTANCE.destroy();
CKEDITOR.config.toolbar_Basic = [['Bold']];
CKEDITOR.config.toolbar = 'Basic';
CKEDITOR.config.width=400;
CKEDITOR.config.height=300;
CKEDITOR.replace('MY_INSTANCE', CKEDITOR.config);
});
when I go to the page, textarea is blinking and appears/disappears all time. What's wrong? How to change ckeditor's config dynamically ?
PS. I've seen this answer, but it didn't help me much
Upvotes: 1
Views: 5706
Reputation: 86
In case anyone wondered about multiple editors solution, I find this to be the best one.
$(".ckeditor").each(function() {
CKEDITOR.replace($(this).attr("id"), {
extraPlugins: 'justify,font'
});
});
Upvotes: 1
Reputation: 289
Use This:-
CKEDITOR.replace( 'editor1', {
language: 'fr',
uiColor: '#9AB8F3'
});
For More information click here
Upvotes: 1