Feb 17, 2004, 6:45 PM
Post #1 of 1
Help needed when changing toolbar config on the fly
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 something.style.display = '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)