Skip to content

TextInput accepts formatted text on paste, shows formatting in the TextInput but gives plain text from callback #31442

@vaibhavs2

Description

@vaibhavs2

Description

TextInput accepting rich(formatted) text on paste. all colors, fontSize, spacings are maintained and showing up in TextInput but onTextChange not giving any information about formatting, it just giving out plain texts.

React Native version:

Binaries:
Node: 14.15.4 - ~/node/bin/node
Yarn: 1.22.10 - ~/node/bin/yarn
npm: 7.9.0 - ~/node/bin/npm
Watchman: Not Found
SDKs:
Android SDK:
API Levels: 23, 27, 28, 29
Build Tools: 28.0.3, 29.0.1, 29.0.2
System Images: android-23 | Intel x86 Atom_64, android-27 | Intel x86 Atom_64, android-27 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom_64
Android NDK: Not Found
IDEs:
Android Studio: Not Found
Languages:
Java: javac 9-internal - /usr/bin/javac
Python: 3.8.5 - /home/war/anaconda3/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.4 => 0.63.4
npmGlobalPackages:
react-native: Not Found

Steps To Reproduce

  1. Use Android OS
  2. Use TextInput in components
  3. Copy rich(formatted) text from any webpage in you mobile browser
  4. Paste that copied rich text in the TextInput
  5. looks at the text you got from onTextChange
  6. Don't do like copy rich text from browser on Desktop and paste that in emulator, it will not reproduce.
  7. Copy from Mobile's bowser and paste in the same mobile's new react-native App's TextInput

Expected Results

TextInput should show the same plain text that we are getting from onChangeText, or onChangeText should give us information about formatting with Pasted text.

screenshot :

message contains the plain text I am getting from onChangeText

state

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions