Add HTML to Xpages RichText Field


//create the date
var date1 = new Date();

//cycle through all rt fields
for( var i in CKEDITOR.instances){
rteditor = CKEDITOR.instances[i];

//check if this is the rtfield i need
if( rteditor.name == '#{id:richTextField1}'){
rteditor.insertHtml("<br><p><--------" + date1.toLocaleDateString() + "     :     " + date1.toLocaleTimeString() + "-----------></p><br>")
}
}
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.
2 comment(s)Login first to comment...
jeniffer homes
(at 07:50 on 19.12.2015)
. This snippet detects IE 11 based on the user agent string.
Anonymous
(at 07:48 on 19.12.2015)
. This snippet detects IE 11 based on the user agent string.