A directory of browser-based WYSIWYG editors


Home: htmlArea 2: htmlArea 2 & 3 archive (read only): htmlArea v2.0:
'Multiple htmlArea's on one page' issue

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.


New User

May 23, 2003, 6:46 AM

Post #1 of 4 (1950 views)
'Multiple htmlArea's on one page' issue Can't Post

I would like to use htmlArea on a single form/textarea where users can input multiple data. One of the examples is that visitors can enter name, address and a short note. Such a form/textarea might consist of over 10 different input fields. Rather than defining 10 htmlAreas (not only for performance, but it probably also would not look nice with 10 different button bars) for the different input fields I rather would use one textarea for the different fields. I figured out I could (in one textarea) use a predefined table (2 columns) with on the left side the descriptions/tags (should not be editable) and on the right side users can enter their data. Is this a feasible solution or are there better alternatives? Ideally the editor should hide some buttons for specific fields (e.g. bold is allowed for notes but not for the name and address). Any help is appreciated!


May 26, 2003, 4:40 PM

Post #2 of 4 (1885 views)
Re: [BillyG] 'Multiple htmlArea's on one page' issue [In reply to] Can't Post

Hi Billy,

Thanks for your post. I'm afraid there isn't really a way to do this... htmlArea works on a per-input field basis, so you can only convert individual textareas to htmlAreas - you can't map the toolbar in one htmlArea to multiple fields... it's a nice idea, and has been requested a couple of times, but nothing just yet!

Sorry I couldn't be more help.

New User

Jun 3, 2003, 10:39 AM

Post #3 of 4 (1823 views)
Re: [Benjamin] 'Multiple htmlArea's on one page' issue [In reply to] Can't Post


Thanks for your reply. I do have to additional questions since I am considering other work-arounds:

1. Is there a function that does the opposite of 'editor_generate()', in other words that kills a htmlArea? In that way I might be able to replace an htmlArea with a normal textarea dynamically.

2. How does the application deal with onBlur and onFocus events? It would be sufficient if I could link these events to a function that would dim(disable) or enable the menu when the cursor leaves/enters an htmlArea.



Jun 3, 2003, 10:58 AM

Post #4 of 4 (1822 views)
Re: [BillyG] 'Multiple htmlArea's on one page' issue [In reply to] Can't Post

Hey Billy,

1. No, there's not really a function that does the opposite of editor_generate() - except the editor_setmode() function which toggles between a regular textarea and the htmlArea. However, you might want to look into stylesheets to hide / show two different fields - one htmlArea, one textarea. Just an idea.

2. Good question... you could capture the onfocus() event with editing the editor_action() function (I think that's what it's called). That function is always called whenever anything happens in the htmlArea. Not so sure about onblur, though - you might want to take a look through the code and see if you can suss that one out.


Search for (options)