tinymce/tinymce — pull request #404 by jdfm (2014-07-16 18:50:43+00:00)
Title: Editor.addButtons: Add various buttons at once with a single toolbar setting string.

The idea is to be able to add various buttons but only declaring one setting in the toolbar. As per the example in the comment of addButtons if in a toolbar you would place something like: '... | example | ...', in it's place would be a button group with two buttons instead of just one. You can still tack on another option next to "example" to add more buttons to the group. This should be useful for creating default button groups or various buttons at once instead of having to call addButton any number of times.

What I don't like with this code:
I had to alter theme.js to get this to work properly... Functions within functions within functions within... It starts to get a bit messy imho. Frankly I don't know how to make the code cleaner at this point.

I added a property to the button declarations called name to be used in addButton, not sure if this is optimal or not or if this will affect the editor negatively in someway? Maybe problems with the selector?

Does anyone have any suggestions/criticisms?
I'm currently using this code in a project I'm working on atm.