Project

General

Profile

Actions

Bug #106512

open

CKEditor 5: custom transformation do not allow null in regular expression transformation

Added by Rémi Payette 2 months ago. Updated 2 months ago.

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

0%

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

Description

I was trying to do the exact same thing as the original poster of #104827

The fix for the From: part works great, but null still isn't accepted in the To: part, which for ckeditor means : dont replace that part, keep it as is.

https://ckeditor.com/docs/ckeditor5/latest/api/module_typing_typingconfig-TextTransformationDescription.html

Let say I want to put pipes around every word :

editor:
  config:
    typing:
      transformations:
        extra: [
          {
            from: { pattern: '(\s)([A-Za-z]*)(\s)$' },
            to: [ ' |', null, '| ' ]
          }
        ]
TypeError: right-hand side of 'in' should be an object, got null

I'm sorry if I missed something obvious, I have not yet earned my "typo3 master" badge.


Related issues 1 (0 open1 closed)

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

Actions
Actions

Also available in: Atom PDF