Writing in rich text items in Java classes

To create a new rich text item, use Document.createRichTextItem. This method creates an empty item. Use the methods that write to a rich text item to add content. See the topics that tell you how to:

  • Work with text
  • Work with attachments and embedded objects
  • Work with tables
  • Work with doclinks
  • Work with sections

By default, the insertion point for modifications is the end of an item. To change the insertion point, use beginInsert and endInsert.

After creating or modifying a rich text item, call the save method of Document.

You can compact and update a rich text item.