Issue Bug Closed

#108800 CKEditor 5: custom transformation do not support capture groups + to array with regular expressions

Daniel Siepmann 01/29/26, 09:26 updated 03/31/26, 08:10

Description

  1. introduced general support for regular expressions in text transformation, corresponding changelog: https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.4.x/Important-104827-AllowToUseRegularExpressionsInCKEditorYAML.html
    But at least in TYPO3 v13.4.23 it does not support capture groups like mentioned in upstream CKEditor project:
    - Docs: https://ckeditor.com/docs/ckeditor5/latest/features/text-transformation.html#example-using-transformationsremove-and-extra
    - Code: https://github.com/ckeditor/ckeditor5/blob/v47.0.0/packages/ckeditor5-typing/src/texttransformation.ts#L56

Our use case: Convert quotation marks for French language from " to »«

The corresponding configuration leads to a JavaScript issue, example configuration:

editor:
  config:
    typing:
      transformations:
        extra:
          - {from: {pattern: '(tsconf|t3ts)$', flags: ''}, to: 'TYPO3 TypoScript TSConfig'}
          - {from: {pattern: '`(^|\\s)(")([^"]*)(")$`', flags: ''}, to: [null, '»', null, '«']}

The first one works fine, the 2nd one doesn’t work, but ends in:

Uncaught (in promise) TypeError: right-hand side of 'in' should be an object, got null
    C ckeditor5.js:431
    E ckeditor5.js:419
    E ckeditor5.js:419
    E ckeditor5.js:422
    E ckeditor5.js:419
    E ckeditor5.js:419
    E ckeditor5.js:422
    C ckeditor5.js:428
    initCKEditor ckeditor5.js:242
    firstUpdated ckeditor5.js:195
    _$AE reactive-element.js:6
    performUpdate reactive-element.js:6
    scheduleUpdate reactive-element.js:6
    _$ET reactive-element.js:6
    requestUpdate reactive-element.js:6
    _$Ev reactive-element.js:6
    b reactive-element.js:6
    h lit-element.js:6
    h ckeditor5.js:181
    t custom-element.js:6
    x ckeditor5.js:40
    <anonymous> ckeditor5.js:416

Reviews 3

History 711

  1. Garvin Hicking commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-02-17T10:20:11+00:00" > 02/17/26, 10:20 </span>

    Applied in changeset commit:b96b36abb732d834d01551709dcc5357436f3fdb.

  2. Gerrit Code Review pushed patch set 2 for 12.4 to change 92864 status Resolved Under Review <span data-processor="relativetime" data-value="2026-02-17T12:38:46+00:00" > 02/17/26, 12:38 </span>

  3. Garvin Hicking commented and changed status Under Review Resolved <span data-processor="relativetime" data-value="2026-02-17T13:25:09+00:00" > 02/17/26, 13:25 </span>

    Applied in changeset commit:a375bb80ff10a96763f973b7e233c66b4d02e3fd.