compact (RichTextItem - Java)

Compacts a rich text item to use minimum space.

Note: This method is new with Release 6.5.

Defined in



public void compact()
    throws NotesException


In rare cases, editing a rich text item may introduce extraneous space. This method eliminates any extraneous space.

This method invalidates the positions of navigators and is best used at the end of editing.

In an open document in edit mode (the NotesDocument via NotesUIDocument.Document), changes made to rich text will not appear on screen immediately as they would with fields of other types. There is no method to cause this update to occur. You must close and reopen the document to see changes.