Skip to main content
    Country/region select      Terms of use
     Home      Products      Services & solutions      Support & downloads      My account     

developerWorks  >  Lotus  >  Forums & community  >  Best Practice Makes Perfect

Best Practice Makes Perfect

A collaboration with Domino developers about how to do it and how to get it right in Domino

Ralf Petter writes:
> ...I hope IBM will enhance Richtext support in lotus script and java in future versions of Notes/Domino. An alternative will be to complete DXL support for rich text so i can make the manipulation in DXL.
Rich text support in DXL is already pretty good. As Bob Balaban has just mentioned in his blog, rich text round-tripping works nicely except for certain weird documents containing CD records that perhaps it's impossible to create in recent versions without use of the C API. I'm told that layout regions also don't work in this context, which Bob didn't mention.
One drawback to using DXL to modify rich text is that you can't do it in the UI without doing a save, since the DXL importer doesn't have an option to import into a note in memory -- only to disk. To get around this, one could use a little temporary database, import the document into there, then use the regular Notes classes to copy the rich text data out into the document you're working on.
> And it would be very helpful if we can make backend changes to rich text visible without saving and reloading the document.
Actually, you can do that. I wrote an Update rich text tip on the in the Notes/Domino forums with sample code. You do have to reload, but you don't have to save.
Admittedly, it would be nice if they could just be updated the same way as other fields, without having to worry about your form event code executing.

Andre Guirard | 4 May 2007 01:10:00 AM ET | Plymouth, MN, USA | Comments (3)


1) Thanks for your suggestions!
Ralf M Petter | 5/4/2007 2:34:37 AM

Thank you for your hint. I did not know, the rt.update() method. Maybe the Designer help can be improved with your example. Because in Notes 6 there is no example for this method. So if someone does not know your posting on it is not easy to find out what rt.update() actually does.

To the fidelity of DXL. I do not know about the fidelity in Notes 7.x and 8, because my company is on 6.0.x and in this version, i had some problemes loosing design attributes of tables.

Because my company is upgrading to Notes 7.0.2 soon, i will try again.

Ralf M Petter

2) Update rich text
Karl-Henry Martinsson | 5/4/2007 7:56:21 AM

Nice tip, but as you note yourself, it would be nice if we could do more with rich text fields without all the extra code...

What I would love to see is a function like this:


It will take a back-end NotesRichTextItem and render the contents into the specified rich ┬┤text field on the open UI doc.

3) RT to HTML
Declan Lynch | 5/4/2007 8:31:49 AM

One thing I would love to see if an EASY way to get a html version of a richtext field in LS. Something like rthtml = rtitem.ExtractHTML

Currently the method of creating temp mime fields is a complete pain and adds extra time to apps.

 Add a Comment
Comment:  (No HTML - Links will be converted if prefixed http://)
Remember Me?     Cancel

Search this blog 


    About IBM Privacy Contact