getFormattedText (RichTextItem - Java)

Returns the contents of a rich text item as plain text.

Defined in

RichTextItem

Syntax

public String getFormattedText(boolean tabstrip, int linelen, int maxlen)
    throws NotesException

Parameters

boolean tabstrip

If true, tabs are replaced by spaces in the resulting plain text. If false, tabs are retained.

int linelen

Number of characters at which to wrap (carriage return and line feed) lines of text. Zero means 80 characters. Words without white space are not wrapped.

int maxlen

Maximum number of characters to return. Set to 0 for the default.

Return value

String

The contents of the rich text item, as plain text.

Usage

This method strips out non-text data, such as bitmaps and file attachments.

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.

Example