Getting content from javascript

  •  03-16-2005, 6:28 AM

    Getting content from javascript

    A user enters some text in the editor, then switches to HTML view and makes some further changes.
     
    I need to get the correct content from the editor without a form post, that is in javascript.
     
    I can get the content from the editor in Normal view by doing this:
     
    var editor = document.getElementById('<... Insert ID of Editor here ...>');
    if (editor != null) {
      var doc = editor.GetDocument();
      if (doc != null) {
        return doc.body.innerHTML;
      }
    }
    return "";
     
    But this does not work when the user is in HTML view.
     
View Complete Thread