TinyMce RichText Editor integration in XPages

I have created a Tinymce integration custom control for XPages.

Why is this a good thing?
Well this means that you can edit richtext in XPages both on the web, the Notes Client and it works with IPhone,IPad with IOS5.
You do not need to rely on when a new version of Domino is released. New versions of Tinymce is released more often than Domino releases.

It has alot of features that the Domino RT editor don’t. The custom control is lacking one thing in this version but I believe that this can be done in the future and that is image upload support. Another thing that is giving me a headache is Backend Richtext support and this 64K. If I add html using Richtextitem.appendtext the help states that it will automatically add a paragraphs if the content is larger than 35K. What happends it cuts the appended text at 64K 🙁
2011 and we have restrictions in Domino that is from 1995, Please IBM build a RichText version 2 and it don’t have to be compatible with version 1 so we can drop all these restrictions. 

It’s released here at openntf.org

  1. Fredrik stöckel

    I have encountered this problem several times and feel your pain 🙂

    The trick to solve this however, is to control how you append text to the rt-item so that you can split the text into several smaller (<64) chunks and append each part as a paragraph instead of just appending one large text block.

    If you split the text by carriage-return (worst case) or something more suiteable () and then append each part (and adding the removed back again (if you use the java/js split method)) you should be able ro avoid the 64k limit for each paragraph.

    I’m just glad we don’t have to write a complete wysiwyg editor from scratch anymore! (as you had to in the “old days” if the requirement was rt support in the browser). There are lots of nice editor implementations freely available out there today (and timymce is one of the best I think).


    • I did a quick test to try this when I found the problem and I got the same problem anyway so I think the problem is deeper.
      If you do the same in ordinary web you will get some kind of corruption in the RT field. I found out this the hard way when one of my customers.
      started to report problems with empty RT fields. The solution there was to .appendRtItem instead, but this technique can’t be used here.

      • Fredrik Stöckel

        strange, I have several implementations of this (some old) running, some containing very large content. Must test and see if I can reproduce or if I’ve some something further to make it work.


        • How do you cut the data 16K, 32K ?

          Perhaps it works I just did a quick test and that didn’t work so. I will try to do a proper test and cut the data.
          If you say it should work.


          • I tried a middle way now I tried cutting the data at 25K and checking for the next > so I don’t cut the html wrong. Also tried adding RT.addnewline and \n but still got the same result.

    • I have read this before. And I have found the problem with the 64K limit so a new version will be published soon.


  2. i need the code foe creating rich text box features in lotus notes

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.