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' } )
source share