NSData object that contains an RTF stream corresponding to the characters and attributes within the given range, omitting all attachment attributes.
- macOS 10.0+
A data object containing an RTF stream for the attributed string.
Writes the document-level attributes in
doc, as explained in RTF Files and Attributed Strings.
range if any part of
a lies beyond the end of the receiver’s characters.
When writing data to the pasteboard, you can use the
NSData object as the first argument to the
set, with a second argument of
NSRTFPboard. Although this method strips attachments, it leaves the attachment characters in the text itself. The
rtf(from:), on the other hand, does strip attachment characters when extracting RTF.