View Full Version : HTMLEditor Show Hide Format Buttons

4 Oct 2010, 10:07 AM
I would like to show the italics and hide the underline and bold buttons. The only option that I can find is enableFormat and this shows/hides all three buttons.

I thought about just hiding the buttons at run time, but the ids for the tables and buttons that surround the bold and underline buttons are dynamically generated. In other words it just gives an id of "ext-gen#". I will have this on different pages and I cannot guarantee that the number will be the same every time.

Please let me know if you have any other ideas.


4 Oct 2010, 12:35 PM
Check out the HtmlEditor's getToolbar method, then take a look at the Toolbar's find or findBy methods, and finally the Button's disable or hide methods.

5 Oct 2010, 8:10 AM
That was exactly what I was looking for. I have a list of the buttons now and can show and hide them accordingly.