social-linkify
Converts inline urls, #hashtags, @mentions, etc. into clickable links. Supports linkifying plain text, or HTML. Works in Node or the browser.
API
The linkify function accepts three arguments:
;
- The text to linkify
- The name of the source where this content originated
- Optionally, some entities returned by that source's API (only twitter or facebook at the moment).
The linkify.html
function accepts the first two arguments above.
Example
var linkify = ; // Linkify a tweet with entities from the Twitter API; // Linkify a Facebook post with message_tags from the Facebook API; // Linkify an Instagram post; // Linkify some HTMLlinkify;