Change CKEditor toolbar dynamically

hpique picture hpique · Sep 21, 2012 · Viewed 26.9k times · Source

How do you change the CKEditor toolbar dynamically (without using a pre-defined toolbar)?

The CKEditor Developer's Guide only tells you how to set the toolbar during initialization.

I'm using CKEditor 3.6.4.

Answer

hpique picture hpique · Sep 21, 2012

Following mb21's suggestion I managed to load a new toolbar by reinitialising the whole editor:

CKEDITOR.instances.editor.destroy();
CKEDITOR.replace('editor', configWithNewToolbar);