0
votes

I am trying to create documents inside a LotusNotes Database by using the COM API. So far everything is working, except for the rendering of the RichText.

The RichText is created by converting a MarkDown document to RichText using Pandoc. Afterwards, I create a new RichTextItem.

In PowerShell it looks like this:

# A LotusNotes document
$Document = $Database.CreateDocument()

# Add a Body field as type RichText
$RTI = $Document.CreateRichTextItem("Body")

# Append the RichText to the field
$RTI.AppendText("THE_CONVERTED_MARKDOWN_COMES_HERE")
$Document.Save($true, $true)

But when I view the document, I only see the raw unformatted RichText in the body field. How can I render the text?

1

1 Answers

0
votes

That's what AppendText does. It takes whatever you give it and renders it as plain text.

I am not familiar with Pandoc and have no idea what format is coming out of your conversion from MarkDown, but if it is HTML then you probably need to be using NotesMIMEEntity and other classes related to it. Otherwise, investigating a third party product like the MIDAS Rich Text API from Genii Software may be your best course of action.