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.

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.