Issue Bug Closed

#105116Linkbrowser, default classes removal

Morten Pless 09/25/24, 09:55 updated 10/07/26, 18:51

Description

### Current behavior
When configuring the link browser to use default classes for page, url and file links, the classes are added to the link in CKEDITOR. When removing the link through the context menu or the link browser popup, the href attribute is removed but the class remains present and also the a tag.
The style itself is also not removeable by the styles plugin.

### Expected behavior/output
The class and tag should be removed

### TYPO3 versions
TYPO3 12, CKEDITOR 5

### UPDATE
If removing the link through context menu BEFORE SAVING, the tag and class is correctly removed.

### Additional context
YAML configuration:

allowedTypes: "page,url,file"
allowedOptions: "target,title,class,params"
classesAnchor:
  - { class: "external-link", type: "url", target: "_blank" }
buttons:
  link:
    queryParametersSelector:
        enabled: true
    targetSelector:
      disabled: false
    properties:
      class:
        required: false
        allowedClasses: external-link
    url:
      properties:
        class:
          default: "external-link"

After insertion:

<p>
    This is an <a class="external-link" href="https://docs.typo3.org/">external link</a>.
</p>

After removal:

<p>
    This is an <a class="external-link">external</a> link.
</p>

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 2

  1. Georg Ringer commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2025-04-01T19:19:17+00:00" > 04/01/25, 19:19 </span>

    can you please reproduce that in v13, class didn’t stay for me.

  2. Georg Ringer commented and changed status Needs Feedback Closed <span data-processor="relativetime" data-value="2026-10-07T18:51:31+00:00" > 10/07/26, 18:51 </span>

    closing the issue because lack of feedback. if still relevant, please open a new issue or contact me on slack to discuss.