Astrocoders/react-native-selectable-text

Cannot being selected if wrapped in <Text>

seanlau555 opened this issue · 3 comments

Hi all,

I am trying to use this with html render. The closest result that I can get is using with 'react-native-markdown-renderer'. However, it seems cannot not being select if wrapped with Text component as below. Is there any suggestion? Thank you~

e.g.

STRONG TEXT with normal p

translate to ->

<Text> <SelectableText menuItems={actions} highlightColor={highlightColor} onSelection={this.onSelection} value={content.strong} /> <SelectableText menuItems={actions} highlightColor={highlightColor} onSelection={this.onSelection} value={strong.p} /> </Text>

Yeah you shouldn’t use around text Element

@seanlau555 it does work sometimes in iOS but it's not very reliable for crossplatform because of Android. I would advise you to try a different solution like passing a style prop to SelectableText itself

OK! Thx a lot for you guys help ^^