-
Description Coming from Plate Version 10, we were passing target: '_blank' to link the plugin in nodeProps. After updating to Plate version 19.5, we found the existing link nodes attributes don't have the target="_blank" anymore, therefore opening the link on the same page. We don't see this change reported on the CHANGELOGS of the link plugin. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Could I bump this too :) We're a messaging app, so users share links a lot. Any help appreciated. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to find which PR caused this change; none of the changes in Plate 19.5.0 seem to be responsible. Can you confirm which version this first started happening in? The quickest way of solving this in your own app would be to make your own Link component. You can reuse as much or as little of Plate UI's component as you want; just import and extend any one of LinkElement, LinkRoot, useLink or getLinkAttributes. The best way of solving this in Plate would be to make the default target customizable in the plugin options. If anyone wants to submit a PR for this, I would recommend adding a |
Beta Was this translation helpful? Give feedback.
I'm trying to find which PR caused this change; none of the changes in Plate 19.5.0 seem to be responsible. Can you confirm which version this first started happening in?
The quickest way of solving this in your own app would be to make your own Link component. You can reuse as much or as little of Plate UI's component as you want; just import and extend any one of LinkElement, LinkRoot, useLink or getLinkAttributes.
The best way of solving this in Plate would be to make the default target customizable in the plugin options. If anyone wants to submit a PR for this, I would recommend adding a
defaultLinkAttributes: React.AnchorHTMLAttributes<HTMLAnchorElement>
plugin option which is consum…