Can I make a suggestion:
On your docs Page there should be a section about onLinkPress that reads something like |
To enable the user to press a link, the LINKING library must be IMPORTED at the top of your code, as well as this line must appear in the HTML call statement like so:
<HTML
html={this.content}
onLinkPress={(event, href)=>{
Linking.openURL(href)
}}
/>
@magicmiles thank you.
I have troubles with this ...
Seems not works with the app is make with Expo :(
@davidcort It's doing fine with expo but you must import Linking from expo not react-native
Example: import { Linking } from 'expo'
this post saved my morning. Thanks @magicmiles
Saved my bacon by providing this, THANK YOU!!! Worked awesome for phone linking too by providing the tel: in the href before the number.
Thanks for your example! Really help me.
Excelent.
One question: how could you get the link text, besides the href attribute? The text is valuable info too.
<a href="...">This here</a>
Excelent.
One question: how could you get the link text, besides the href attribute? The text is valuable info too.
<a href="...">This here</a>
Any Update on this?
You're a legend @davidcort
If you import Linking from react-native, it's work like a charm.
In react-native-render-html v5.0.0, onLinkPress defaults to a function invoking Linking.openURL, so there won't be a need for documenting this! See #442
Most helpful comment
Excelent.
One question: how could you get the link text, besides the href attribute? The text is valuable info too.
<a href="...">This here</a>