Skip to content

Commit 7832212

Browse files
authored
fix: pasting images on Android (#163)
Fixes: #158
1 parent 1e74336 commit 7832212

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

android/src/main/java/com/swmansion/enriched/EnrichedTextInputView.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,9 @@ class EnrichedTextInputView : AppCompatEditText {
204204
}
205205
}
206206

207-
val finalText = currentText.mergeSpannables(start, end, item?.text.toString())
207+
// Currently, we do not support pasting images
208+
if (item?.text == null) return
209+
val finalText = currentText.mergeSpannables(start, end, item.text.toString())
208210
setValue(finalText)
209211
parametrizedStyles?.detectAllLinks()
210212
}

0 commit comments

Comments
 (0)