Token compatibility with CKEditor 5

Created on 26 March 2023, about 1 year ago
Updated 21 September 2023, 9 months ago

Currently I run Amazon Tokens with CKEditor 4.

However, if I try to change the Editor to CKEditor 5 (on drupal 9) I get the following error message:

CKEditor 5 only works with HTML-based text formats. The "Amazon filter" (amazon) filter implies this text format is not HTML anymore.

Does this need extra support or is this a false positive?

-----

Fix for D10 compability as this is a textfilter:

Problem/Motivation

Switching to CKEditor 5 (Experimental) in Drupal 9 leads to:

CKEditor 5 only works with HTML-based text formats. The "Improve line breaks" (improve_line_breaks_filter) filter implies this text format is not HTML anymore.

Currently the type is:
type = Drupal\filter\Plugin\FilterInterface::TYPE_MARKUP_LANGUAGE

See https://api.drupal.org/api/drupal/core!modules!filter!src!Plugin!FilterI...

I guess it needs to be switched over to one of the other types?

  • FilterInterface::TYPE_HTML_RESTRICTOR: HTML tag and attribute restricting filters.
  • FilterInterface::TYPE_MARKUP_LANGUAGE: Non-HTML markup language filters that generate HTML.
  • FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE: Irreversible transformation filters.
  • FilterInterface::TYPE_TRANSFORM_REVERSIBLE: Reversible transformation filters.

Perhaps FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE?

Unsure where and why this was changed in core. CR?
See the related issues for further information

Steps to reproduce

Proposed resolution

Switch to TYPE_TRANSFORM_IRREVERSIBLE?

Remaining tasks

User interface changes

API changes

Data model changes

Taken from here, Example [3326729]

✨ Feature request
Status

Fixed

Version

2.1

Component

Code

Created by

πŸ‡¨πŸ‡­Switzerland Castor-designs

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024