Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion packages/react-native-aztec/ios/RNTAztecView/RCTAztecView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class RCTAztecView: Aztec.TextView {
delegate = self
textContainerInset = .zero
contentInset = .zero
textContainer.lineFragmentPadding = 0
textContainer.lineFragmentPadding = 0
addPlaceholder()
textDragInteraction?.isEnabled = false
storage.htmlConverter.characterToReplaceLastEmptyLine = Character(.zeroWidthSpace)
Expand Down Expand Up @@ -197,6 +197,14 @@ class RCTAztecView: Aztec.TextView {
}
}

override func sizeThatFits(_ size: CGSize) -> CGSize {
// Set the Placeholder height as the minimum TextView height.
let minimumHeight = placeholderLabel.frame.height
let fittingSize = super.sizeThatFits(size)
let height = max(fittingSize.height, minimumHeight)
return CGSize(width: fittingSize.width, height: height)
}

func updateContentSizeInRN() {
let newSize = sizeThatFits(frame.size)

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 @@ -13,6 +13,7 @@ For each user feature we should also add a importance categorization label to i

## 1.35.0

* [***] Fixed empty text fields on RTL layout. Now they are selectable and placeholders are visible.
* [**] Add settings to allow changing column widths
* [**] Media editing support in Gallery block.

Expand Down