285
Support selecting text within <Text> elements (for copy&paste, etc)
Activity
Newest
Oldest
SAKSHI MODI
We are "Assignment Solutions" providing quality assignment writing solutions all over the world. We have a large team of experienced writers who can handle all types of assignments. Assignment Solution's purpose is to provide assignment solution with " Cost Effective"," Timely Service" and " Plagiarism free work".
Website – https://qualityassignmentsolution.com
sabu shah
Thanks for this great information
Nicholas Gervais
For anyone looking for a simple solution you can just use the "selectable" prop for the <Text> component. Check it out here: https://reactnative.dev/docs/text#selectable
Arend Rosendahl
Hvor mange restaurantbesøg rører en på den måde dagen efter? Og nu, flere dage efter, <a href="https://www.bindia.dk/take-away-birkerod.html" title="indisk mad Birkerød">indisk mad Birkerød</a> hvor jeg skriver denne anmeldelse sidder jeg og smiler og føler mig helt varm og hjertet.
ö
ömer faruk kaya
Still no update????
Ryan Boyajian
TextInput under the hood uses UITextView on iOS which gives you all of the selectable drag handles while the Text component uses custom text rendering and only allows the user to select all text in the component.
This doesn't seem like as much of a hack due to the fact that this also gives us auto linking for phone numbers, urls, calendar events and addresses. The TextInput props would need to have: editable: false, multiline: true, scrollEnabled: false to enable this feature (and behave like a normal Text component). Optionally adding dataDetectorTypes: ['all'] to support auto linking and handling of phone numbers, urls, calendar events and addresses. The documentation for TextInput's dataDetectorTypes basically suggests this hack: https://reactnative.dev/docs/textinput#datadetectortypes.
Lev Eliezer Israel
This one really hurts. I'm responsible for a text-focused app, and this issue alone might push us off of React Native.
Stéphane Montlouis-Calixte
Lev Eliezer Israel: what did you finally chose ?
B
Bardiamist
multiline disabled TextInput allow to change selection but somebody think this is bug https://github.com/facebook/react-native/issues/27296
ö
ömer faruk kaya
Is there any update to selectable text?
Brandon OVA
Using TextInput seems like a hacky workaround to me.
On another note, the docs state using the selectable-property on <Text> does the following: "Lets the user select text, to use the native copy and paste functionality.", which is clearly not the case on ios.
Load More
→