This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Oct 20, 2012, 4:04 PM
35 Posts

HTML code into RTItem

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role: End user,Developer,Administrator
  • Tags: xpages rtitem html
  • Replies: 0
 Hello Forum,
 
I'm currently trying to add a RichText signature into my mailfile using a Xpage. Therefore I create htmlCode that I render into a computed field, results looks great. Then I wan't to add the result into the CalendarProfile RichTextItem, but the result is HTML code when a create a new mail. I can't find a solution to render the HTML properly.
 
Is it possible to convert HTML to RichTextItem, maybe using copy/past of the rendered content... Does someone have an idea? 
 
My code snippet: 
 
var rtStyle:NotesRichTextStyle = session.createRichTextStyle();
rtStyle.setPassThruHTML(1);
profDoc.removeItem("Signature_Rich");

var rtField:NotesRichTextItem = profDoc.createRichTextItem("Signature_Rich");
rtField.appendStyle(rtStyle);
  rtField.appendText(htmlCode); 

profDoc.replaceItemValue("Signature_1", "");
profDoc.replaceItemValue("Signature_2", "");
profDoc.replaceItemValue("Signature", "")
profDoc.save();
 
 Thx in advance and have a nice week-end.
 
Chris 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal