Contents

init(attributedSelectedText:contextBefore:contextAfter:markedText:selectedRangeInMarkedText:)

Initializes a document with attributed strings that represent the selection and its surrounding context.

Declaration

init(attributedSelectedText selectedText: NSAttributedString?, contextBefore: NSAttributedString?, contextAfter: NSAttributedString?, markedText: NSAttributedString?, selectedRangeInMarkedText: NSRange)

Discussion

The attributedSelectedText, contextBefore, and contextAfter parameters represent the same ranges as their counterparts in init(selectedText:contextBefore:contextAfter:markedText:selectedRangeInMarkedText:), and carry the same requirements, with the addition of text formatting and style attributes.

See Also

Creating a text document context