@apollohg/react-native-prose-editor 0.5.10 → 0.5.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4669,6 +4669,13 @@ final class RichTextEditorView: UIView {
4669
4669
  remoteSelectionOverlayView.refresh()
4670
4670
  }
4671
4671
 
4672
+ func currentCaretRect() -> CGRect? {
4673
+ guard let selectedTextRange = textView.selectedTextRange else { return nil }
4674
+ let rect = textView.caretRect(for: selectedTextRange.end)
4675
+ guard rect.height > 0 else { return nil }
4676
+ return textView.convert(rect, to: self)
4677
+ }
4678
+
4672
4679
  func remoteSelectionOverlaySubviewsForTesting() -> [UIView] {
4673
4680
  remoteSelectionOverlayView.subviews.filter { !$0.isHidden }
4674
4681
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apollohg/react-native-prose-editor",
3
- "version": "0.5.10",
3
+ "version": "0.5.12",
4
4
  "description": "Native rich text editor with Rust core for React Native",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/apollohg/react-native-prose-editor",