Skip to content

Commit

Permalink
Remove platform check for component's set rich text attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsaidi committed Jan 22, 2024
1 parent 3069451 commit 85b2b6c
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,11 @@ public extension RichTextViewComponent {
_ attribute: RichTextAttribute,
to value: Any
) {
#if macOS
setRichTextAttribute(attribute, to: value, at: selectedRange)
typingAttributes[attribute] = value
#else
if hasSelectedRange {
setRichTextAttribute(attribute, to: value, at: selectedRange)
} else {
typingAttributes[attribute] = value
}
#endif
}

/// Set certain attributes at current range.
Expand Down

0 comments on commit 85b2b6c

Please sign in to comment.