[feature request] Replace matched text by a component
Hello,
Great module! I'd like to propose a feature request, and see if other people would be interested in this:
I have a use case where I need to match text fragments and replace them with some other texts which need to be wrapped in <TouchableOpacity /> components, to make them easily clickable/tapable. Currently, as renderText only accepts strings as output values, this is not possible. But this also implies that the root component returned by <ParsedText /> needs to be a <View> component rather than a <Text> component, since React Native only does not allow <View> components to be nested in <Text> components.
What do you think?
Yeah, or images or similar. Would be awesome!
Yeah this feature would be great, or make another setting to renderComponent so we can choose the parent component and child components to render.
This is great, but currently, today, react-native doesn't support arbitrary components embedded inside a text-components. -- This may be a difficult feature to build, as you'd have to split text subcomponents into bits, and figure out how the rendering & layout would work. If a PR has this working, I'd be happy to review it!
related issue: #64 related issue: #68