【发布时间】:2021-06-06 04:07:40
【问题描述】:
我想从反应原生的文本中获取所有链接。喜欢
someFunction.getLinks('Any links to github.com here? If not, contact test@example.com');
应该返回类似的东西
[
{
type: 'url',
value: 'github.com',
href: 'http://github.com'
},
{
type: 'email',
value: 'test@example.com',
href: 'mailto:test@example.com'
}
]
react 中的 Linkify 可以做到这一点,但我们如何在 react native 中做到这一点?
【问题讨论】:
标签: reactjs react-native linkify