Skip to content
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

Provide an option to display an icon for links that leave the domain of the website or open in a new tab or window #21905

Open
Tracked by #35073
rweil55 opened this issue Apr 26, 2020 · 3 comments
Labels
[Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Type] Enhancement A suggestion for improvement.

Comments

@rweil55
Copy link

rweil55 commented Apr 26, 2020

One of the things that I do for links that leave my sites is to append the common icon of a small square with an up arrowexternal. I do this by adding a class="hyperlink_external" to the <a tag.
Some possible solutions are:

  1. When editing a hyperlink in the editor I would like an option to specify the class of the hyperlink.
  2. Have the editor examine the link and set the class based on where the link is going.

I suspect getting #2 right for all cases would be a hard problem, so I would go for #1.

@talldan talldan added [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Type] Enhancement A suggestion for improvement. labels Apr 29, 2020
@talldan talldan changed the title adding a class to a hyperlink Provide an option for display an icon for links that open in a new tab/window Apr 29, 2020
@talldan talldan changed the title Provide an option for display an icon for links that open in a new tab/window Provide an option to display an icon for links that open in a new tab or window Apr 29, 2020
@talldan
Copy link
Contributor

talldan commented Apr 29, 2020

@rweil55 I hope you don't mind, but I relabeled the issue to make it more searchable.

I think it's also good to state what the problem is in the title as it provides an opportunity for others to suggest solutions.

@rweil55 rweil55 changed the title Provide an option to display an icon for links that open in a new tab or window Provide an option to display an icon for links that open in a new tab or window or leave the site Apr 29, 2020
@rweil55
Copy link
Author

rweil55 commented Apr 29, 2020

The up arrow image typically means that you are leaving the domain of the web site. I have not seen any symbolization for the new tab/window option.

@rweil55 rweil55 changed the title Provide an option to display an icon for links that open in a new tab or window or leave the site Provide an option to display an icon for links that leave the domain of the website or open in a new tab or window Apr 29, 2020
@rweil55
Copy link
Author

rweil55 commented Feb 20, 2022

I prefer the original title as it provides a more general solution. There are other attributes of a link that can be controlled by the class attribute.
If you just specify an icon, which one would be the default and how would one go about changing it?
I also might want to use a different icon for different domains

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants