Yesterday I was working on Audit trail functionality for one of my web form. I was using Rich text field to log activities on the form. Code was quite simple so done in few minutes and started testing.Chunk of my code was ,

Call rtitem.appendStyle(RtStyle)
Call rtitem.AppendText(tmpname.common)
Call rtitem.AddNewLine(1)

When I've started doing testing found AddnewLine property doesn't work fine and giving strange results.

I've tried to debug but not able to find what is wrong with AddNewLine method which works perfectly in client application. Next, I've decided to use PassThruHTML property of NotesRichTextStyle class and insert HTML directly into Rich Text field. When I've started testing the new code found RT field is not parsing HTML correctly.

Even I've used the same code which is mentioned in Notes help but didn't work.
I thought there must be a problem in putting RT field in HTML table , so I took out and placed outside table and verified but no use. My next debugging was from dojo side , I thought there must be something which I might have missed in dojo. I've spend couple of hours to test if anything went wrong in dojo but ended up with the same problem. At the end started looking IBM articles and found it's known bug which is reported five years back. To work around this issue, add brackets, [ ], around your string.When applied this work around everything works well ,

I've couple of concerns, First, Why this bug is still there with R8.x versions ? This must be fixed long time back or they don't like to enhance Rich text capabilities in Lotus Notes.Second, Why AddNewLine property doesn't work properly on web like Notes client.

2 Responses to "BUG in PassThruHTML property of NotesRichTextStyle class"

  1. gravatar Ben Langhinrichs Says:

    I'm sorry to say, IBM has shown extremely little interest in either rich text programmability or rendering to HTML for the past ten years. Bugs such as this are likely to remain unfixed, as there does not appear to be anybody inside IBM tasked with that sort of cleanup. (Disclaimer: I am perhaps biased due to my own products, Midas Rich Text LSX, CoexEdit and iFidelity, which address different parts of these issues with Lotus Notes)

  2. gravatar Rishi Says:

    I'm completely agree with you Ben, I don't think so there should be any excuse why IBM hasn't done enough in RT area.I've read your test cases on iFidelity, it's simply awesome.Along with that, I've seen power of CoexLinks very closely when I was in Philips.
    I must say you are capable enough to replace project manager in IBM who is responsible for RT development :)

Leave a Reply

preload preload preload