linkable-js
Detect URL, Email, Hashtag and Mention from plain-text and convert into HTML clickable hyperlink.
Install
$ npm install --save linkable
Usage
const text = 'This is test with a #hashtag from @linkable on github.com' const linkable = console
Output:
This is test with #hashtag from @linkable on github.com
Options
for more details see src/index.js
file
const options = mentionStyle: 'twitter' replaceHashtag: replaceHashtag replaceMention: replaceMention replaceUrl: replaceUrl replaceEmail: replaceEmail