npm install react-native-anchor-parser
yarn add react-native-anchor-parser
import { ArchorParser } from 'react-native-anchor-parser'
...
let yourString = `Lorem Ipsum is simply dummy text of the printing and typesetting industry <a href="https://example.com">Example Show1</a> Lorem Ipsum is simply dummy text of the printing and typesetting industry <a href="https://example.com">Example Show1</a> Lorem Ipsum is simply dummy text of the printing and typesetting industry`
...
<ArchorParser
string={yourString}
stringStyle={{ fontSize: 20 }}
linkStyle={{ fontSize: 20, color: '#2980b9' }} />
string is present default value
Type | Required |
---|---|
string | Yes |
numberOfLines for showing lines of string, default is 0
Type | Required |
---|---|
int | No |
style object for text/string
Type | Required |
---|---|
object | No |
style object for link
Type | Required |
---|---|
object | No |