xing/wysihtml5 — pull request #310 by jamesburke-examtime (2013-01-09 15:23:09+00:00)
Title: Toolbar code updated to work with multiple edit areas (fixed diff).

This is a version of pull request #145 which should have a much more readable diff - all credit to @nevf. It has also been updated to align with the latest version of toolbar.js.

This includes a working example file (I made a *wysihtml5-0.3.0-mod.js* file to allow this example to be working - this is just the 0.3.0 file with the modified code from toolbar.js).

From @nevf in #145:

> I have made various updates to enable wysihtml5 to be used with multiple editors on a page.
>
> A single toolbar can be used for all edit areas or each one can have it's own toolbar. Only the former has been tested.
>
> new wysihtml5.toolbar.Toolbar( editor1, "toolbar" ) creates a toolbar.
> editor1.toolbar.destroy() destroys it.
>
> These would typically be called on.focus and on.blur.
>
> I have include an example: simple_2_editors.html
>
> Please ignore .gitignore, dist/wysihtml5-0.3.0.min.js and dist/wysihtml5-0.3.0.js commits. I am new to Github and Git.
>
> -Neville