Reputation: 1977
I have CKEditor 4, and want to configure a set of toolbars inline with this documentation for CKEditor 3: http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Toolbar.
Basically I want to setup a few Toolbar definitions (e.g. config.toolbar_Email with one toolbar configuration, and config.toolbar_Cmscontent with another set).
Then when I declare CKEditor on an element, I can specify which toolbar I wanto to use.. eg:
CKEDITOR.replace( 'editor1',
{
toolbar : 'Email'
});
or
CKEDITOR.replace( 'editor1',
{
toolbar : 'Cmscontent'
});
I can't get this working in CKEditor4, and can't find anything on it other than in CKEditor 3 documentation.
Can anyone tell me if this has been deprecated in v4? Is there another way I can setup my own toolbar definitions?
Many Thanks
Jason
Upvotes: 1
Views: 167
Reputation: 15895
The feature is still available in CKEditor 4.x:
CKEDITOR.config.toolbar_MyCustomToolbar = [ [ 'Bold' ] ];
CKEDITOR.config.toolbar_MyYetAnotherCustomToolbar = [ [ 'Italic' ] ];
CKEDITOR.replace( 'editor1', {
toolbar: 'MyCustomToolbar'
} );
CKEDITOR.replace( 'editor2', {
toolbar: 'MyYetAnotherCustomToolbar'
} );
See the fiddle. Read some docs. Follow the guide.
Upvotes: 2