react-native-typerich 0.1.11 → 0.1.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.
|
@@ -211,7 +211,12 @@ class TypeRichTextInputView : AppCompatEditText {
|
|
|
211
211
|
|
|
212
212
|
// text
|
|
213
213
|
val text = item.coerceToText(context).toString()
|
|
214
|
-
|
|
214
|
+
val editable = editableText
|
|
215
|
+
val start = selectionStart.coerceAtLeast(0)
|
|
216
|
+
val end = selectionEnd.coerceAtLeast(0)
|
|
217
|
+
|
|
218
|
+
editable.replace(minOf(start, end), maxOf(start, end), text)
|
|
219
|
+
|
|
215
220
|
return true
|
|
216
221
|
}
|
|
217
222
|
|