Problem/Motivation

I wanted to change the external link icon and I noticed only 2 options:

  • add a fontawesome icon font (invasive solution)
  • rewrite the Drupal.extlink.applyClassAndSpan javascript function (unflexible solution)

Proposed resolution

I think we should add a twig template for the icon itself so we can rewrite it in our theme.

Comments

JFKiwad created an issue. See original summary.

b0b’s picture

I am looking for a way to change the icon to whatever I like also. But rather than a template I would prefer just an option to add a class to the link. Then it can be styled any way you like, like add a pseudo element with a background image for the icon.

I see selecting the option to add an icon also adds an .ext class to the link. So a third hack would be to set the svg to display none and then add the icon you want in the css. Not great, but okay I guess.

smustgrave’s picture

Status: Active » Postponed (maintainer needs more info)
smustgrave’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)