Search code examples
lotus-notesxpageslotus-domino

Xpages rich text field full alignment


In the rich text field I choose Full alignment, but when previewed the text has left alignment. When I close and reopen the document, the text is brought back to left alignment. How can this be resolved?


Solution

  • If I understand you correctly, you have a Notes Form with a Rich Text field, in which you align the text "justified", as in the screenshot below: Align Justified in Notes Client, viewed in Notes Clients

    But if you view that in a Xpage, the text is no longer justified, neither in the read-only rendering, nor in the edit-rendering with the CKEditor: Align Justified in Notes Client, viewed as an Xpage in the browser

    Alas, if you align the text justified via the CKEditor, it renders properly in the browser Align Justified in CKEditor, viewed as an Xpage in the browser

    with an "interesting" rendering in the Notes Client: Align Justified in CKEditor, viewed in the Notes Client

    This is a "known" problem and in my demo case, the Xpages runtime engine even warns me about that: Saving this document will change its format from native Notes rich text to HTML.  This may cause a change or loss of formatting if opened again in the regular Notes client.

    "Saving this document will change its format from native Notes rich text to HTML. This may cause a change or loss of formatting if opened again in the regular Notes client."

    The conversion of rich text to HTML and vice versa is not the whole problem, even though the message says that. There are also issues with repeated conversions back and forth changeing font sizes, loss of certain colors and styles, etc.

    This is a long standing issue with Ben Langhinrichs, who documents that rather thoroughly and even sells an extension to handle that conversions better.

    Hope this helps a little bit.