From ef7f92ed151c7bc623539d55166076f61c54cddd Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sat, 11 Jan 2020 15:09:41 +0100 Subject: [PATCH] fixed: documentation for attributedStringWithAttachment: was missing --- AppKit/CPTextView/CPTextStorage.j | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/AppKit/CPTextView/CPTextStorage.j b/AppKit/CPTextView/CPTextStorage.j index c59e5744e..13b22ae25 100644 --- a/AppKit/CPTextView/CPTextStorage.j +++ b/AppKit/CPTextView/CPTextStorage.j @@ -262,6 +262,12 @@ var CPTextStorageDelegate_textStorageWillProcessEditing_ = 1 << 1, return [super attributedSubstringFromRange:aRange]; } +/*! + Returns an instance of CPTextStorage that contains the provided instance of CPView. + This can be used to insert arbitrary views into the text. These views are treated as individual characters during editing. + This works only with views that implement to the CPCoding protocol +*/ + + (id)attributedStringWithAttachment:(CPView)someView { var result = [[self alloc] initWithString:_CPAttachmentCharacterAsString];