Allow use link in Text
donskov opened this issue · 3 comments
donskov commented
Is your feature request related to a problem? Please describe.
Can't use link in Text (like <a href="#">link</a>).
Describe the solution you'd like
<Text
href="#"
openExternalLinks={true}
textInteractionFlags={{
[TextInteractionFlags.TextBrowserInteraction]: true,
}}
>
link
</Text>Additional context
jswhisperer commented
You can use open to open links https://github.com/nodegui/react-nodegui-starter/blob/master/src/components/steptwo.tsx#L9
donskov commented
@gregbenner Thanks for the response, but I need to use a link in the text without an extra button.
Your solution helps me:
<Text wordWrap={true} openExternalLinks={true}>
{`
<ol>
<li>
Open chrome and navigate to chrome://inspect. You should see a target below with your app <a href="https://react.nodegui.org">link</a>.
</li>
</ol>
`}
</Text>jswhisperer commented
I'll add this as an example to the docs when I get a sec thanks for sharing