tasti / react-linkify

React component to parse links (urls, emails, etc.) in text into clickable links
http://tasti.github.io/react-linkify/
MIT License
554 stars 106 forks source link

Customization that varies per use #58

Open gavrichards opened 6 years ago

gavrichards commented 6 years ago

I know that you can customize the global linkify instance, and that's great, but I'd like to be able to apply some customizations in some cases and different ones in others.

As an example, I'd like to convert @mentions and #hashtags for Twitter where I'm dealing with tweet text, but then also be able to do the same for Instagram, in the same app.

At the moment I can't see how this would be possible. If you could pass configuration into each instance that would achieve this, that would be great.

tasti commented 6 years ago

I'm working on adding just that! Take a look at https://github.com/tasti/react-linkify/blob/master/src/components/Linkify.jsx#L12-L15 for a sneak peek.

I'll be working finalizing and documenting the API. Feel free to pass along any suggestions.