The ext class gets removed if you uncheck adding an icon

Created on 10 July 2023, over 1 year ago
Updated 29 July 2024, 4 months ago

Problem/Motivation

There are use cases that people might want to adjust the look of the external link themselves, so one solution would be to uncheck "Place an icon next to external links" and adjust things around with CSS

But unchecking that will also remove the .ext class, it shouldn't.

Also good to have is to have the possibility of adding custom classes as I've linked that issue here as well

Proposed resolution

We should separate the concerns here, the form settings shouldn't control the class name being added or not but rather what it says to do here:

$form['extlink_class'] = [
  '#type' => 'checkbox',
  '#title' => $this->t('Place an icon next to external links.'),
  '#return_value' => 'ext',
  '#default_value' => $config->get('extlink_class'),
  '#description' => $this->t('Places an <span class="ext"> </span>&nbsp; icon next to external links.'),
];
πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024