Project

General

Profile

Actions

Bug #102559

open

Epic #99669: CKEditor5 Collection

CKEditor: RegExp rules in editor.config.htmlSupport not working

Added by Sven Proffe 10 months ago. Updated 10 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2023-11-29
Due date:
% Done:

0%

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

Description

According to the docs of CKE/General HTML Support (see: https://ckeditor.com/docs/ckeditor5/latest/api/module_html-support_generalhtmlsupportconfig-GeneralHtmlSupportConfig.html#member-disallow) names, atrribute keys, CSS classes and so on for allow/disallow rules can be declared as regular expressions. Using such values in RTE YAML config files does not work, though (TYPO3 12.4.8). Such values seem to get passed as strings to the editor options and will then not be interpreted correctly by CKE:

editor:
  config:
    htmlSupport:
      allow:
        - {
             name: /.+/,
             classes: [
               /my-icon-classes.*/
             ]
             attributes: [
               { 
                 key: /^data-.+$/, 
                 value: true 
               }
            ]
        }

Expected behaviour: Regular expressions from YAML files in editor.config.htmlSupport.allow or .disallow will work in CKE


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #104827: CKEditor 5: custom transformation do not allow regular expressions due to escapingResolved2024-09-05

Actions
Actions #1

Updated by Chris Müller 10 months ago

  • Parent task set to #99669
Actions #2

Updated by S P 15 days ago

  • Related to Bug #104827: CKEditor 5: custom transformation do not allow regular expressions due to escaping added
Actions

Also available in: Atom PDF