I want to paste into a react-native-material-textfield, but do something based on the pasted content (i.e. if the pasted content is a link, style it accordingly). However, in order to do this I need to know when something has been pasted into the OutlinedTextField. I am not sure how to listen for a paste event. The Clipboard does not really help here because all it does it set/get content, not tell me if some arbitrary content has been pasted.
In the above sample code const isPasted = content.includes(copiedContent); is always return false when using OutlinedTextField but in normal TextInput of react native it is working fine.
I want to paste into a
react-native-material-textfield
, but do something based on the pasted content (i.e. if the pasted content is a link, style it accordingly). However, in order to do this I need to know when something has been pasted into theOutlinedTextField
. I am not sure how to listen for a paste event. The Clipboard does not really help here because all it does it set/get content, not tell me if some arbitrary content has been pasted.The minimal sample code
In the above sample code
const isPasted = content.includes(copiedContent);
is always return false when usingOutlinedTextField
but in normalTextInput
of react native it is working fine.Please help me to resolve problem . Thanks