We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Add new buttons to jHtmlArea (HTML Editor) | Forum

Lars Oct 26 '15
Hello there,

I was wondering, if it is possible to add new buttons to the HTML Editor. As far as I can tell from the files you are using jHtmlArea with a custom setup. jHtmlArea is offering buttons like font color for example, which aren't available in Oxwall. 

So my question is - Is it possible to add those buttons and functions? I am aware of, that I might have to add css codes and a new sprite image for those buttons, which shouldn't be a problem. What I need to know is the JS-Part. I guess I have to edit htmlarea.js, but what do I have to add? And is it even possible?

Thanks for your help and your great software, which I realy like!

Best regards!

The Forum post is edited by Lars Oct 26 '15
Ronald Sep 19 '16
Edit htmlarea.js  in     0w_static/plugina/base/js  

Rule nr 25 add it like this:

var buttons = [[`bold`, `italic`, `underline`, `link`],[`orderedlist`, `unorderedlist`], [`more`, `image`, `video`, `html`]];


["html"], ["bold", "italic", "underline", "strikethrough", "|", "subscript", "superscript"], ["increasefontsize", "decreasefontsize"], ["orderedlist", "unorderedlist"], ["indent", "outdent"], ["justifyleft", "justifycenter", "justifyright"], ["link", "unlink", "image", "horizontalrule"], ["p", "h1", "h2", "h3", "h4", "h5", "h6"], ["cut", "copy", "paste"]

However i noticed that you have to allow custom html to make these options to work.

I also noticed that not every option is working even when you add them.

i.e.  i added unlink to it but that one doesn't appear in the textarea in forum.

      i also added html to it and that one appears in forum but not in the Note plugin.

If somebody knows how this can be solved, i would be happy too.

ross Team
ross Sep 19 '16
Topic was moved from General Questions.