open link in a new tab?
Closed this issue · 10 comments
Is there anyway to open the link in a new tab? right now it opens it in the same tab
According to the demo(http://tasti.github.io/react-linkify/),
<Linkify properties={{target: '_blank'}> ... </Linkify>
And I think this is a frequent use case, but the current interface isn't intuitive enough. IMHO.
Is there any improvement idea on this? @tasti
One possibility is instead of using properties
, you can just place the props you want each of your links to have directly on Linkify
. For example:
<Linkify target="_blank">...</Linkify>
My worry here is that there may be some overlap that isn't ideal, where there's a prop on Linkify
that is also on a
but with different values. I think there are little to none of these, and seems to be more intuitive.
@tasti I'd be happy to implement the target idea and make a PR if you're interested
Would love to include this, give it a shot :)
@jb-reefer presuming this didn't happen?
@dharness never got a shot - I can work on it this weekend, but if you want to do it feel free!
Hey didn't expect that! Much appreciated!
See #51 (comment).
Add target: "_blank" property as part of options prop