htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Discussion:
multiple textareas with Mozilla


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.

 


abel
New User

Apr 14, 2003, 6:42 AM

Post #1 of 6 (5082 views)
Shortcut
multiple textareas with Mozilla Can't Post

If htmlarea 3.0a is used for more than one textarea under Mozilla, only one of the textareas is converted into a an "htmlarea object". I am by no means a Javascript expert, but it seems that the timeout logic used to initialize htmlarea instances works only for one textarea. The attached patches for htmlarea.js and example.html show how this can be avoided. Not a really nice fix, but it seems to work ;)

Abel
Attachments: example.html.diff (1.04 KB)
  htmlarea.js.diff (3.27 KB)


RipCurl
New User

Apr 21, 2003, 6:28 PM

Post #2 of 6 (5032 views)
Shortcut
Re: [abel] multiple textareas with Mozilla [In reply to] Can't Post

I tried this patch and I could still only get the first htmlarea on a page to work, under Mozilla). Can you post your entire htmlarea.js and example.html (or email me, r_nospam @ mark.org)
thanks!


abel
New User

Apr 22, 2003, 7:11 AM

Post #3 of 6 (5008 views)
Shortcut
Re: [RipCurl] multiple textareas with Mozilla [In reply to] Can't Post

Could it be that you tried to use HTMLArea.replaceAll ?

I did not change that method in my patch; so you would need to initialize all HTMLArea instances in the initEditor function defined in the web page containing the textares/htmlareas.

Anyway, here is a version of htmlarea.js, where HTMLArea.replaceAll is also patched.

Please note that this version is also modified in lines 45, 46 (absolute path to images and popups) and in line 990 ( HTMLArea.getHTML replaced by this.getInnerHTML). I've found the latter patch somewhere in this forum. IIRC it was related to initialisation problems with IE, but I'm not sure...

cheers
Abel
Attachments: example.html (2.83 KB)
  htmlarea.js (36.6 KB)


vonbrocklin
Novice

Apr 25, 2003, 4:00 PM

Post #4 of 6 (4970 views)
Shortcut
Re: [abel] multiple textareas with Mozilla [In reply to] Can't Post

This is weird. Using your technique I am able to display multiple textareas ONLY if I am using Mozilla on the Windows platform. The EXACT same code does not work if I am running Mozilla 1.3 on the Linux platform.

The first box appears and works fine.

The second box appears but does not work at all. I cannot even insert my cursor into the textarea and my default text does not show up.

Does anyone have any ideas why this would be working in Windows but not on Linux???


abel
New User

Apr 27, 2003, 8:15 AM

Post #5 of 6 (4949 views)
Shortcut
Re: [vonbrocklin] multiple textareas with Mozilla [In reply to] Can't Post

This is strange. I can use this version of htmlarea with the Linux version of Mozilla (1.3) fine. Just tried it again: 6 text/htmlareas in one page without any problem... To be precise: I'm using "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.3)" (copy&paste from the "about" page)

As already said, I'm not a Javascript expert, but: It seems that only the first htmlarea is properly initialized in your case. My patch needs a list of htmlareas that must be initialized via the timeout function, so I guess that this list does not contain all html/textareas -- but I have no idea why...

Abel


vonbrocklin
Novice

Apr 27, 2003, 1:40 PM

Post #6 of 6 (4944 views)
Shortcut
Re: [abel] multiple textareas with Mozilla [In reply to] Can't Post

Thanks. I still have NO idea what the problem was but I started over completely from scratch and got multi fields working in Mozilla/Linux. Why it was working perfectly in Windows but not in Linux I'll never know but I'm happy now. Looking forward to the RC1 version whenever it comes out. Smile

 
 
 


Search for (options)