File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -437,8 +437,11 @@ - (void)richTextEditorToolbarDidSelectTextAttachment:(UIImage *)textAttachment
437437 [attachment setImage: textAttachment];
438438 NSAttributedString *attributedStringAttachment = [NSAttributedString attributedStringWithAttachment: attachment];
439439
440+ NSDictionary *previousAttributes = [self dictionaryAtIndex: self .selectedRange.location];
441+
440442 NSMutableAttributedString *attributedString = [self .attributedText mutableCopy ];
441443 [attributedString insertAttributedString: attributedStringAttachment atIndex: self .selectedRange.location];
444+ [attributedString addAttributes: previousAttributes range: NSMakeRange (self .selectedRange.location, 1 )];
442445 self.attributedText = attributedString;
443446}
444447
You can’t perform that action at this time.
0 commit comments