Type Method

textFileTypes

Returns an array of strings representing those file types that can be loaded as text.

Declaration

+ (NSArray *)textFileTypes;

Return Value

An array of NSString objects, containing file extensions and HFS file types. By default, the list returned by this method includes “txt”, “rtf”, “rtfd”, and “html”.

Discussion

This list includes all file types supported by text classes, plus those types that can be converted to supported file types through a user-installed filter service. The array returned by this method may be passed directly to the runModalForTypes: method of NSOpenPanel.

When creating a subclass of NSAttributedString that accepts text data from non-default file types, override textUnfilteredTypes to notify NSAttributedString of the file types your class supports.

See Also

Deprecated Methods

+ textUnfilteredFileTypes

Returns an array of strings representing those file types that can be loaded as a text.

Deprecated
+ textPasteboardTypes

Returns an array of pasteboard types that can be loaded as text.

Deprecated
+ textUnfilteredPasteboardTypes

Returns an array of pasteboard types that can be loaded as text.

Deprecated
- initWithPath:documentAttributes:

Initializes a new attribute string object from RTF or RTFD data contained in the file at the given path.

Deprecated
- initWithURL:documentAttributes:

Initializes a new attributed string object from the data at the given URL.

Deprecated
- initWithFileURL:options:documentAttributes:error:

Initializes a new attributed string object from the data at the given URL.

Deprecated
containsAttachments

Returns whether the attribute string contains any attachment attributes.

Deprecated
- URLAtIndex:effectiveRange:

Returns a URL, either from a link attribute or from text at the given location that appears to be a URL string, for use in automatic link detection.

Deprecated
- drawWithRect:options:

Draws the receiver with the specified options, within the given rectangle in the current graphics context.

Deprecated
- boundingRectWithSize:options:

Calculates and returns bounding rectangle for the receiver drawn using the options specified, within the given rectangle in the current graphics context.

Deprecated