Skip to content

Commit

Permalink
Mobile - RCTAztecView - Fixes font customization not getting updated (#…
Browse files Browse the repository at this point in the history
…53391)

* Mobile - RCTAztecView - Fixes font customization not getting updated when initializing the editor

* Update typingAttributes with the updated font

* Update Changelog

* Remove unneeded changes
  • Loading branch information
Gerardo Pacheco authored Aug 16, 2023
1 parent fb9e8ce commit e1f8a9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,13 @@ class RCTAztecView: Aztec.TextView {
///
private func refreshFont() {
let newFont = applyFontConstraints(to: defaultFont)
font = newFont
placeholderLabel.font = newFont
defaultFont = newFont

if textStorage.length > 0 {
typingAttributes[NSAttributedString.Key.font] = newFont
}
}

/// This method refreshes the font for the palceholder field and typing attributes.
Expand Down
1 change: 1 addition & 0 deletions packages/react-native-editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ For each user feature we should also add a importance categorization label to i
## Unreleased
- [*] Display custom color value in mobile Cover Block color picker [#51414]
- [**] Display outline around selected Social Link block [#51414]
- [**] Fixes font customization not getting updated on iOS [#53391]

## 1.101.0
- [*] Remove visual gap in mobile toolbar when a Gallery block is selected [#52966]
Expand Down

0 comments on commit e1f8a9e

Please sign in to comment.