A directory of browser-based WYSIWYG editors


Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Bug Reports & Fixes:
TextArea not updating fast enough (losing information)

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

Feb 9, 2005, 11:20 AM

Post #1 of 1 (2105 views)
TextArea not updating fast enough (losing information) Can't Post

When in wysiwyg mode, the textarea does not always update fast enough.

In some cases, when clicking submit button on the form, validation on the form says it isn't filled in. But on the second submit, it validates ok.

And on postbacks, if the user goes from typing in wysiwyg mode, and causes a postback the information is lost altogether.

I did create a 'fix' for it. I created a function that periodically updates the textarea box with the html (only if it is in wysiwyg mode) I inserted this into the bottom of the htmlArea.js file.

There are 2 checks to make sure

1: the editor is defined

2: the editor._doc is defined.

This keeps it from trying to do something if the editor has finished loading yet.




if ( typeof ( editor ) != "undefined" )


if ( typeof ( editor._doc ) != "undefined" )


mode = ((editor._editMode == "textmode") ? "wysiwyg" : "textmode");

switch(mode) {

case "textmode":

editor._textArea.value = editor.getHTML();





setTimeout("updateText()", 1000);


setTimeout("updateText()", 2000);


Search for (options)