Extension:WikiEditor/Toolbar customization

If you're just here to get some quick code that you can copypaste into your user JS and will just work out of the box, see the customizations library. The rest of this article explains the technical details of customizing the toolbar and requires a basic level of understanding of JavaScript.

Configuration structure
The toolbar widget is defined by a configuration object. There is no complete documentation yet (this'll be written shortly), but you can look at the configuration object for the default toolbar in SVN.

You can modify the toolbar even after it's been built by calling the  function on the textarea. You will need to do this inside an  call, though.

Removing things
TODO

Modifying things
We don't really have a nice API to modify things, unfortunately. The best we have is a hook to change the configuration of a section just before it's being built: