Merge branch 'focus'
First cut at allowing a plugin to create its own container element. plugin.json changed only to allow for testing, in this config method draw will create its own container node.
Check point, not the full implementation. Still to do... allow the container to specify just a class without an element if plugin-created is true.
Changed plugin config. New 'node' object indicates that the plugin will create its own container whereas the 'container' object indicates that the editor will create the container based on the config. Hit handling remains the same in both cases.
Changed the method draw config to use the new 'node' configuration.
Improve selection tracking on browsers that don't support the selectionchange event.
First cut at separating out resource downloading so that we can tell when the editor is ready for use (i.e. when everything is initialised and all downloads have been received). Currently the info download isn't in this scheme.
Add a global QUINK object in the bootstrap ready for use by host scripts. Use the new global to locate quink (no point having multiple globals where one will do).
Remove logging. No longer either needed or accurate.
New example to test use of the ready function.
Bug fix: makes toolbar showing on page load work again.
Change order to guarantee that subscriptions are setup before publications are made. Likely to make the whole process slightly slower but better that than it fail.
Tidy.
Appears to fix errors on iOS when tapping outside the editable. Looks like iOS creates a selection inside non editable divs.
Allows the toolbar to pop on Android.
Use delegate event handling for hits in case more editables are created at some point in the future.
Make the toolbar draggable on Android. On Android the page[X|Y] values in the event don't get populated so we have to use the touch to get those. Refactor to provide a locatable event that will be the actual event on the desktop and the first target touch on mobile.
Some tidying up of older code.
Relax plugin configuration validation so that node config can exclude hit targets, thus allowing it to be used for node creation but not editing.
Change the name of the html directory to examples so that it can be used for examples other than just html.
Add an example plugin config that creates with one plugin and edits the same node with another.
Refactor... change directory structure in the examples directory so it splits the markup from resources. Edit the markup examples so that they work in the new directory. Remove the dev example that doesn't use the bootstrap as that won't work if we move to the new config setup.
Bug fixes to correct problems introduced the hit handler was changed to use delegated event handlers.
New example to make it simpler to test navigation from the host document. Shows a problem in the way that the toolbar indicates nav with select.
Fix order of toolbar nav buttons.
Makes Method Draw display properly on Android where previously it only took up part of the viewport. The window height was being calculated before the keyboard had retracted. This resizes MD when the window is resized which means that it will be a bit judder to draw in some cases as it draws then redraws when the resize event is fired, but that's better than it only taking up part of the screen and simpler than trying to wait for the keyboard to retract.