A directory of browser-based WYSIWYG editors


Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Discussion:
Help needed when changing toolbar config on the fly

The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.



Feb 17, 2004, 6:45 PM

Post #1 of 1 (3592 views)
Help needed when changing toolbar config on the fly Can't Post


I was wondering if anyone could help me with swapping configs on the fly.

There are 2 main things I am trying to do:
1) Swap between two groups of toolbar buttons, e.g. a basic selection that does not include superscript, subscript, advanced table opperations etc... and an advanced toolbar which shows everything.

2)Resize the toolbar, on the pages where I use HTMLArea I have a lot of other options, rather than opening the HTMLArea in a popup I am hiding everythingn else on the using page = 'none' and then change the config for HTMLArea to one which has a larger height and width.

The way I am doing this at the moment is by locating the HTMLArea with DOM methods and removing it from the document (the toolbar, the iframe, everything that HTMLArea puts in, in place of the textarea) I then use HTMLArea.replace with the original textarea and a different config object.

Is there a better way than removing the existing HTMLArea and then generating a new one with a different config to change configurations?

Can I change config attributes on the fly, e.g. it's size and which buttons are visible? (not just whether they are active or greyed out).

EDIT - I forgot to ask if there was anyway to query the HTMLArea to find out which config it was using in advance so I didn't have to know before hand.

(This post was edited by AdamH on Feb 17, 2004, 6:52 PM)


Search for (options)