232
Support selecting text within <Text> elements (for copy&paste, etc)
Activity
Newest
Oldest
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.
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.
Juned Ahmed Chowdhury
Waiting for updates!!!!
Sukhraj
Still waiting on this over three years later...
hash singularity
This functionality is a real need. I wonder why this has not been implemented yet.
Mikael Sand
I've published a workaround for now if you're interested: https://github.com/msand/react-native-selectable-text
import SelectableText from 'react-native-selectable-text';
export default ({ text, onSelectionChange }) => (
<SelectableText
selectable
multiline
contextMenuHidden
scrollEnabled={false}
editable={false}
onSelectionChange={(event) => {
const {
nativeEvent: {
selection: { start, end },
},
} = event
const str = text.substring(start, end)
onSelectionChange({ str, start, end })
}}
style={{
color: "#BAB6C8",
}}
value={text}
/>);
John
More than 2 years guys. Nice.
J
Jonas Frid
Any update?
Load More
→