bergie / hallo

Simple rich text editor (contentEditable) for jQuery UI
http://hallojs.org/
MIT License
2.43k stars 318 forks source link

Is there any chance there will be a plugin guide #261

Open DanielTate opened 6 years ago

DanielTate commented 6 years ago

I'm finding it hard finding out how to extend this to use a plugin.... I am using Wagtail CMS and I can get the button showing fine and if I pass in 'bold' into the command option for the .js pluign I get the content being wrapped in a <b> element however when I change this to any other command I don't get anything. I can see that its using document.exec to wrap the elements but I'm not sure what to do. I am just trying to wrap my element in a with a class attribute.

It's very hard to follow... How do i know if a button is selected how do I know when it isn't? How do I know if it's pressed, How do I do something when it is selected?

I just want to wrap the selected element in a span...