Hello,
I'm trying to use
https://github.com/xing/wysihtml5, after customising the toolbar.
I just need to add some buttons that should insert some unicode symbols to the typing area, when clicked. I believe this won't require any changes in the parser script.
I've made the GUI, but I don't know how to define the 'commands'
I've uploaded a demo at
http://itsnot.freehostia.com/wysihtm...ihtml5-new.htm
I've added the additional buttons to the markup, like
Code:
<li data-wysihtml5-command="insertInches" title="Insert inches symbol" class="command"></li>
<li data-wysihtml5-command-group="foreFrac" class="fore-frac command" title="Insert the fraction">
<ul>
<li data-wysihtml5-command="foreFrac" data-wysihtml5-command-value="½">½</li>
<li data-wysihtml5-command="foreFrac" data-wysihtml5-command-value="⅓">⅓</li>
<li data-wysihtml5-command="foreFrac" data-wysihtml5-command-value="⅔">⅔</li>
</ul>
</li>
Can anyone please give some hints to define the commands?
(I don't even need to stick with the syntax/structure of the
wysihtml5-0.3.0.js script. Something that would insert the innerHTML value of the <li>s to the typing would even be useful)
Thanks.