Instance Method

selectedRange

Returns the range of selected text.

Required.

Declaration

- (NSRange)selectedRange;

Return Value

The range of selected text or {NSNotFound, 0} if there is no selection.

Discussion

The returned range measures from the start of the receiver’s text storage, that is, from 0 to the document length.

See Also

Handling Marked Text

- hasMarkedText

Returns a Boolean value indicating whether the receiver has marked text.

Required.

- markedRange

Returns the range of the marked text.

Required.

- setMarkedText:selectedRange:replacementRange:

Replaces a specified range in the receiver’s text storage with the given string and sets the selection.

Required.

- unmarkText

Unmarks the marked text.

Required.

- validAttributesForMarkedText

Returns an array of attribute names recognized by the receiver.

Required.