Add content to inputRichText control (CKEditor)

document1.setValue(bodyFieldName,"<p>HTML example</p>));

This small snippet of code add rich text content to an inputRichText control. The trick is to use the method to convert HTML to MIME, as the inputRichText control expects MIME for its setValue() method.

I have blogged in more detail about this at

JavaScript (Server)
Per Henrik Lausten
December 5, 2012 6:11 AM

All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.

1 comment(s)Login first to comment...
John Jardin
(at 10:57 on 11.03.2015)
Hi Per. Just noticed something small...fromHTML("<p>HTML example</p>) is missing a double quote :)