getFormattedText();
The getFormattedText method returns HTML view of the text in text area.
The example of use is given in the page with description of the TextEditor.getFontBox method.
See also:
TextEditor