[PP-1] [META] Discuss: merge the Editor config entity into the FilterFormat config entity

Created on 3 September 2021, over 3 years ago
Updated 3 May 2024, 8 months ago

Problem/Motivation

The editor module was introduced in #1833716: WYSIWYG: Introduce "Text editors" as part of filter format configuration , to layer Text Editor integration on top of our Text Format concept provided by the filter module.

A major reason for doing this was because we wanted it to be entirely optional: rich text/WYSIWYG editors were frowned upon at the time, especially because they generated poor HTML markup.

Times have changed.

Drupal 8 shipped with CKEditor 4, and everything was nicely decoupled. Custom text editors can be implemented. And they are. We should keep the ability to have different text editors for sure!

But … the split between the filter and editor modules, that is more questionable. It means a lot of extra complexity.

On the form side:

  1. editor module must alter the filter_format form to inject its things. It generates a subform (and subform state) for this, so it can make the text editor configurable and allow the Editor plugin to inject its form.
  2. and in turn, a specific text editor that provides extensibility (such as core's CKEditor module) must generate a subform (and subform state) for every plugin that it accepts.

On the configuration side:

  1. FilterFormat and Editor are two distinct config entity types, and each Editor is tightly coupled to a FilterFormat
  2. … but it's the end user's responsibility to keep these in sync!
  3. If/when we add config entity validation (see [PP-2] Introduce ConfigEntityForm to standardize use of validation constraints for config entities Active ), this will become worse, because we'll need to always validate a FilterFormat + Editor pair!

Proposed resolution

Merge them. A single new TextFormat config entity that can optionally contain a text editor — text editors are and should remain optional.

Remaining tasks

Postponed on 📌 Deprecate \Drupal\ckeditor5\Plugin\Editor\CKEditor5::validatePair() and `type: ckeditor5_valid_pair__format_and_editor` Active

User interface changes

API changes

Data model changes

Release notes snippet

🌱 Plan
Status

Postponed

Version

11.0 🔥

Component
Filter 

Last updated 1 day ago

No maintainer
Created by

🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024