How to specify a separate toolbar group for widget buttons?

By default, CKEditor places widget buttons in the insert group of the toolbar. I would like to specify a custom group on the toolbar only for my widget buttons. How can i do this?

+5
source share
1 answer

In this case, you need to register the button yourself in order to have full control over it.

So it might look like this:

 editor.widget.add( 'myWidget', { // For the widget command to work you have to // specify at least template or insert() callback. template: 'foo', ... } ); editor.ui.addButton( 'MyWidget', { label: 'My Widget', command: 'myWidget', toolbar: 'basicstyles,1' } ) 
+5
source

All Articles