Feb 9, 2005, 11:20 AM
Post #1 of 1
When in wysiwyg mode, the textarea does not always update fast enough.
TextArea not updating fast enough (losing information)
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");
editor._textArea.value = editor.getHTML();