Skip to content
This repository has been archived by the owner on Mar 8, 2019. It is now read-only.

Toolbar code updated to work with multiple edit areas (fixed diff). #310

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Burkazoid
Copy link

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

@CatalinMustata
Copy link

This is great and should be pulled into master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants