Open
Description
openedon Apr 24, 2024
What problem does this address?
I am using css to add an icon after any link that is external simple example:
a[target="_blank"]
The problem is for button blocks (maybe other blocks?) the link is a div in gutenberg. So my css does not style the link to match the frontend of the site. Ok, not a problem, I can target it, however there is no way to target the div based on if its an external link.
What is your proposed solution?
If the link within the button has "Open in new tab" checked, we add a class such as "external-link" or "blank-target" or "link-target-blank". With this new class I can target it via custom css for the editor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Link components (LinkControl, URLInput) and integrations (RichText link formatting)Link components (LinkControl, URLInput) and integrations (RichText link formatting)A suggestion for improvement.A suggestion for improvement.