Project

General

Profile

Actions

Bug #105116

open

Linkbrowser, default classes removal

Added by Morten Pless about 1 month ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2024-09-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

  1. 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.
  1. Expected behavior/output
    The class and tag should be removed
  1. TYPO3 versions
    TYPO3 12, CKEDITOR 5
  1. UPDATE
    If removing the link through context menu BEFORE SAVING, the tag and class is correctly removed.
  1. 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>

No data to display

Actions

Also available in: Atom PDF