Skip to content

Commit

Permalink
fix: Ensure text is added at cursor point
Browse files Browse the repository at this point in the history
  • Loading branch information
Siobhan committed May 19, 2023
1 parent 5409ec2 commit 3a0d386
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,10 @@ class RCTAztecView: Aztec.TextView {
self.text = text.replacingOccurrences(of: objectPlaceholder, with: "")
}

self.insertText(dictationText)
// Get current position of cursor and add dictated text to it
if let range = self.selectedTextRange {
self.replace(range, withText: dictationText)
}
}

// MARK: - Custom Edit Intercepts
Expand Down

0 comments on commit 3a0d386

Please sign in to comment.