richeditor.toString() not working in FireFox

Jan 28, 2009 at 1:34 AM

Along with underlying HTML I am trying to get plain text as well by calling
richeditor.toString() in CopyText and saving it to a hidden field.

Works fine in IE, but in FireFox I get "undefined".

function CopyText2() {
 contents = top.document.getElementById(editorId);
 contents.value = richeditor.toHtmlString();
 var plainText = top.document.getElementById("ctl00_ContentFrame_plainText");
 plainText.value = richeditor.toString();

traced it down in Firebug to the following function:
RichTextEditor.prototype.toString = function() {
 return this.GetDocument().body.innerText;

innerText does not seem to exist, instead there is textContent attribute, which does have the plain text I am looking for.

Anyone has ideas on what is going on here, why is it different between IE and FF?

Any help is much appreciated,