Tidy.
Work round what appears to be a rangy bug when there is no selection.
First cut at separating out the apply style menu to allow user provided functions for configuration. The idea is to have a menu system that is fully configurable and a style menu that builds on top of that. This version provides all the functions needed in the document and uses an internal quink api, so it isn't ideal. Currently still only allows for a single menu on the toolbar which will be fixed in later revisions.
This commit seems to provide the same functionality as before the re-work.
Comment out unused function.
Minor refactor and tidy.
Make the style menu reflect the state of the selection as it did before the rework. Uses more internal quink api.
Move the JavaScript in the styles example out into a separate file as it's easier to maintain.
Make the menu add the close option.
Remove unused functions from the Stylesheet manager.
The popup in the toolbar now only shows styles that apply to fonts.
Tidy.
Make multi select an option for popup menus configured in the toolbar json.
Refactor to make menu state handling part of the menu (although done by the supplied function).
Moves the functionality around resolving and invoking functions from names into a separate module.
Adds a second style button to the toolbar that shows a strokes menu.
Add another style menu on the toolbar. Currently they all use the same icon.
Have the toolbar only show the 3 style menu buttons.