For some reason, I am having mixed results. I have a field that stores xHTML from the web editor (textarea). The user is able to create nice text -w- colors, bold, images, etc… When the form is saved and it is viewed in read mode, I just see the HTML tags/text. What am I missing? I have tried adding a computed text element under each field with a value of the field name, etc. The computed text shows in read and the field/editor shows in edit. Any ideas? Thanks… I even highlighted the computed text and set as passthru. I am sure this is something obvious… as other forms are working. I’m trying to see what is different… not so obvious at the moment.
Subject: Web Editor (Textarea + Field) & Read Mode
I was able to do it using a text-editable field instead of a RT field. I need to use a RT field as the field used by the web editor/textarea because the XML agent uses “…htmlitem1 As notesrichtextitem”, etc. Cannot use this, right? …noteitem?
Subject: RE: Web Editor (Textarea + Field) & Read Mode
Hi Michael,
I’ve done this before. Once the HTML is in the rich text area it can’t be “shown” as html in read mode using pass-thru html settings or square brackets.
The trick is to make the content pass-thru with lotusscript.
Check out this code I use in the webquerysave of the document:
…
'Code added to make the contents of Body rich text fields passthruHTML
If doc.HasItem(“Body”) Then
Set rtfBody = doc.getfirstItem(“Body”)
If rtfBody.type = RICHTEXT Then
strContent = rtfBody.GetUnformattedText()
rtfBody.remove
Set rtfStyle = session.CreateRichTextStyle
rtfStyle.passthruhtml = True
Set rtfBody = New NotesRichTextItem(doc,"Body")
rtfBody.appendStyle(rtfStyle)
rtfBody.appendText(strContent)
End If
End If
…