Currently, to add a new toolbar button something like the following is done:
mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) { $textarea.wikiEditor( 'addToToolbar', { 'section': 'main', 'group': 'insert', 'tools': { 'newtool': { /* โฆ */ } } } ); } );
It is possible to add a new section in an expandable tab, or a new group to an existing section (including the top level main section), but it's not possible to have a new top-level section.
This is a proposal to add a new secondary section, that is the same as the main section but located at the right-hand (or left-hand for RTL) end of the toolbar.
Currently, the Wikisource, ProofreadPage, and VisualEditor extensions add widgets to this end of the toolbar, and they do it by injecting into the DOM manually and styling the position themselves.
By default, this section would be empty (but the up-coming real-time preview will be building an optional Preview button into WikiEditor, which will appear in this location).