Waxolunist / bootstrap3-wysihtml5-bower

Simple, beautiful wysiwyg editor

Home Page:http://waxolunist.github.io/bootstrap3-wysihtml5-bower/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding custom toolbar buttons is made slightly more awkward than necessary

cooperaj opened this issue · comments

I'm utilising the underlying wysithtml5 libraries 'insertHTML' command on some custom buttons. To do this I've created a template that includes these commands and have added

custombuttons: true,

to my user options to get it to load. Only it doesn't load because the this library uses the defaultOptions to populate the toolbar and not the combined default/user options. To work around this I have added the above to the the underlying $.fn.wysihtml55.defaultOptions object. This realistically achieves the same but is not super intuitive.

Can you give a fiddle for that, or a link to a repo?

This doesn't work but details the code i'm using and the fix i've put in

http://jsfiddle.net/fdRR9/

Please have a look at v0.2.9. I think, this is what you intended to do.