-
Notifications
You must be signed in to change notification settings - Fork 109
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
rich-text Insert Hyperlink no target option #477
Comments
You can resolve this issue using render options.
|
@tinycoding5 this code you provided will apply for all links the same behaviour but i want a each link to be micro managed for target |
In this case, you can create new contentful. |
For anyone trying to do this using vanilla js and not react: import { INLINES } from '@contentful/rich-text-types'
const renderOptions = {
renderNode: {
[INLINES.HYPERLINK]: (node: any, next: any) => {
return `<a target="_blank" href=${ node.data.uri }>${ next(node.content) }</a>`
}
}
}
documentToHtmlString(json, renderOptions) |
Would love to see this feature. It would allow authors to choose which links open in a new tab/window and improve UX. |
Hi ,
when we specify the link via insert hyperlink on rich text option
it lacks the option to specify the target="_blank" or target="_self"
i this this could be a very useful feature to leverage
The text was updated successfully, but these errors were encountered: