Issue Bug Closed

#105992CKEditor does not allow data-attributes in V12

Daniel Kempf 01/27/25, 12:39 updated 02/03/25, 13:42

Description

Hi all

For additional data-atributes for a-tags in TYPO3 V11 I used to have following code in a custom configuration yaml-file:

editor:
  config:
    stylesSet:
      - { name: "Button Preis Popup", element: "a", attributes: { "class": "buttonPrice", "data-toggle": "modal", "data-target": "#modal-popup" } }

This worked wonderfully and without any problems.

Now with TYPO3 V12 I try to fix it but can’t find a proper solution. So far I have tried the following:

editor:
  config:
    htmlSupport:
      allow:
        - { name: "a", attributes: ["data-toggle", "data-target"] }
    processing:
      allowAttributes: [class, id, title, dir, lang, xml:lang, itemscope, itemtype, itemprop, data-toggle, data-target]
    style:
      definitions:
        - { name: "Button Preis Popup", element: "a", classes: ["buttonPrice popup"], attributes: {"data-toggle": "modal", "data-target": "#modal-popup"} }

But without success. What else do I need to consider recently? I am grateful for any suggestions or assistance.

Reviews 0

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