Thursday, February 27, 2020

NotesRichText to HTML native within Domino 10

Just realized that Domino 10+ came with possibility to convert RichTextItem to HTML almost in 1 line.

RichTextItem rt = (RichTextItem) doc.getFirstItem("Body");
String html = rt.convertToHTML(null);

Finally all these tricky transformation of RichText to HTML can be removed, same goes to custom JSON and HTTPRequest libraries.

I wonder what other useful improvements I missed?

2 comments :

Lars Berntrop-Bos said...

Yes. But I'd still like HCL to make a generous donation to Geniisoft and incorporate Midas into the Notes and Domino code.

Sven Hasselbach said...

The method is very nice and helped me a lot. The other new method GetHTMLReferences seems to be buggy, I was unable to get any attachment with HTMLReference.extractFile or HTMLReference.getFileName (Last tested with 10.0.1FP2)