Skip to content

Commit

Permalink
Directly access attributed text
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekzaw committed Apr 17, 2024
1 parent 3809a0e commit fad4a4f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ios/MarkdownTextInputDecoratorView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,10 @@ - (void)setMarkdownStyle:(RCTMarkdownStyle *)markdownStyle
[_markdownUtils setMarkdownStyle:markdownStyle];

// apply new styles
NSAttributedString *attributedText = _textView.attributedText;
#ifdef RCT_NEW_ARCH_ENABLED
[_textInput _setAttributedString:attributedText];
[_textInput _setAttributedString:_textView.attributedText];
#else
[_textInput setAttributedText:attributedText];
[_textInput setAttributedText:_textView.attributedText];
#endif /* RCT_NEW_ARCH_ENABLED */
}

Expand Down

0 comments on commit fad4a4f

Please sign in to comment.