Text objects such as NSText and NSTextView can contain either plain text or rich text. Plain text objects allow only one set of text attributes for all of their text; rich text objects allow multiple fonts, sizes, indents, and other attributes for different sets of characters and paragraphs. You can control whether a text object is plain or rich using the setRichText:
method. Rich text objects are also capable of allowing the user to drag images and files into them. This behavior is controlled by the setImportsGraphics:
method.
A rich NSText object can use RTF (Rich Text Format) as an interchange format. Not all RTF control words are supported, however. On input, an NSText object ignores any control word it doesn’t recognize; some of those it can read and interpret it doesn’t write out. Table 1 lists the RTF control words that any text object recognizes. Subclasses may recognize more.
© 1997, 2004 Apple Computer, Inc. All Rights Reserved. (Last updated: 2004-02-16)