3

React Native : 0.61.4

If paste formatted text into my TextInput, the styles of TextInput are ignored.

 <TextInput
    multiline
    scrollEnabled={false}
    inputAccessoryViewID="reviewButton"
    style={{
      fontSize: 20,
      alignSelf: 'center',
      marginHorizontal: '15%',
      flex: 1,
      textAlignVertical: 'top',
      color: 'black',
    }}
    value={content}
    maxLength={200}
    onChangeText={changeContent}
  />

I specified the color and fontSize in the style of TextInput, but when I use paste, the color and fontSize are different.

How can I remove Text format when pasting?

It only happens on Android.

oijafoijf asnjksdjn
  • 1,115
  • 12
  • 35

1 Answers1

1

After doing some research and try to recreate your case in some famous React native app, I think its can't be possible :)

And btw, in case you haven't notice yet, in Android, there are always two options for pasting including Paste and Paste as plain text.

Brian H.
  • 1,603
  • 11
  • 16