Thank you for this very helpful reply! ...this is pretty much what I'm looking for, except I can't quite get it working. I have slightly modified it to be:
var item:NotesRichTextItem = mainControl.getDocument().getFirstItem(compositeData.get('fieldName'));
html = item.getUnformattedText() + '<br />';
...but this give me the following error:
Error calling method 'getUnformattedText()' on an object of type 'lotus.domino.local.Item [Static Java Interface Wrapper, lotus.domino.local.Item: lotus.domino.Item]'
I was under the impression that adding ":NotesRichTextItem" to the end of the variable would cast it to the appropriate object type.
Am I missing something? Thanks again for any help!