-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Target Blank Doesn't Work #96
Comments
Seems like it was removed in this commit from what I can tell at a quick glance 95f8607#diff-3a7bfc073d2f2d2454177d75e2f4e231 |
As a workaround, you can do: <Linkify
componentDecorator={(decoratedHref, decoratedText, key) => (
<a target="blank" href={decoratedHref} key={key}>
{decoratedText}
</a>
)}
> |
wow! works like a charm. Thank you @nwesthoff |
Guess this library's dead right? Wanted to use it in production due it's size, bummer. |
Seems like they have removed the support for the |
Exactly @asp2809, that's actually how I figured out the workaround 👍 |
I used this. But still opening in the same tab itself. I checked through the inspect element. The output is following: Please help me out. I'm stuck here. |
Not sure if this is what you're running into but the Linkify component should either have a closing
If that doesn't help, please create a minimal reproduction on codesandbox and I might be able to help. |
@nwesthoff I didn't change anything but now it's working.
Thanks @nwesthoff |
You can create a decorator like some of the other comments here have mentioned. If you want to open new tabs securely, especially if the links are leaving the site you control, I suggest implementing the following: TypeScript supported CodeSandbox: https://codesandbox.io/s/cool-montalcini-vkmtb?file=/src/App.tsx
...then... import { SecureLink } from "react-secure-link"
<Linkify componentDecorator={(decoratedHref, decoratedText, key) => (
<SecureLink href={decoratedHref} key={key}>{decoratedText}</SecureLink>
)}>
Here is a link that will open securely in a new tab: www.github.com.
</Linkify> |
nice. thank you @nwesthoff, as the docs still show the |
Thanks, this worked for me |
I think we dont need install package for this goal, we can just add |
|
In the current version i.e. "^1.0.0-alpha", the support for properties is removed. You can either do like this: <Linkify
componentDecorator={(decoratedHref, decoratedText, key) => (
<a target="blank" href={decoratedHref} key={key}>
{decoratedText}
</a>
)}
> Else, downgrade to version "0.2.2". Worked for me! |
I assume this should be closed. This worked fine for me on version 4.1.3: #96 (comment) |
When I do:
and
description
equals:it will render:
with version:
The text was updated successfully, but these errors were encountered: