Introduction
React Native’s TextInput currently supports only textual pasting and lacks native support for pasting images, stickers, GIFs, and rich content from system clipboards and modern keyboards (e.g., Gboard, Samsung Keyboard, iOS pasteboard).
This limitation prevents developers from building modern rich-text editors, chat applications, notes apps, and productivity tools that need to handle multimedia paste actions.
Native platforms provide this capability:
- Android: via
InputConnectionCompat#onCommitContent (for Gboard stickers, screenshots, GIFs) and onTextContextMenuItem(android.R.id.paste)
- iOS: via overrides to
paste: and access to UIPasteboard.general (image, video, GIF, etc.)
React Native does not surface these events to JS, making it impossible to implement image-pasting without writing a custom native component.
Details
This discussion proposes adding a standardized way for React Native apps to:
- Detect when an image or other rich content is pasted into a
TextInput
- Receive the content in JS as a URI, base64, or temporary file path
- Handle content insertion manually, similar to how
onChangeText exposes text
A minimal API surface could look like:
<TextInput
onPasteImage={(event) => {
console.log(event.nativeEvent.uri); // file:// or content:// or base64
console.log(event.nativeEvent.mime); // image/png, image/webp, image/gif
}}
/>
Introduction
React Native’s
TextInputcurrently supports only textual pasting and lacks native support for pasting images, stickers, GIFs, and rich content from system clipboards and modern keyboards (e.g., Gboard, Samsung Keyboard, iOS pasteboard).This limitation prevents developers from building modern rich-text editors, chat applications, notes apps, and productivity tools that need to handle multimedia paste actions.
Native platforms provide this capability:
InputConnectionCompat#onCommitContent(for Gboard stickers, screenshots, GIFs) andonTextContextMenuItem(android.R.id.paste)paste:and access toUIPasteboard.general(image, video, GIF, etc.)React Native does not surface these events to JS, making it impossible to implement image-pasting without writing a custom native component.
Details
This discussion proposes adding a standardized way for React Native apps to:
TextInputonChangeTextexposes textA minimal API surface could look like: