Generated with the help of an LLM.

Problem/Motivation

8.x-1.x keeps code for backwards compatibility that the next major version can drop. This issue tracks what to remove in 2.0.x.

Proposed resolution

Remove in 2.0.x:

  • CKEditor 4 support: src/Plugin/CKEditorPlugin/DrupalEntity.php (already @deprecated in entity_embed:8.x-1.7 and is removed from entity_embed:2.0.0), js/plugins/drupalentity/, the CKEditor 4 to 5 upgrade plugin (src/Plugin/CKEditor4To5Upgrade/EntityEmbed.php) and the entity_embed_ckeditor_test test module. Core removed CKEditor 4 in Drupal 10.
  • CKEditor 4 support stays in 8.x-1.x until then: the commercial CKEditor 4 LTS module provides the ckeditor module on Drupal 11, with support until December 2026. The CKEditor 4 to 5 upgrade plugin is already unused on Drupal 11 and is removed from 8.x-1.x in #3639510: Remove the CKEditor 4 to 5 upgrade plugin, which can't run on Drupal 11.
  • The @EntityEmbedDisplay annotation (src/Annotation/EntityEmbedDisplay.php) and annotation discovery in EntityEmbedDisplayManager. Plugins should use the #[EntityEmbedDisplay] attribute (#3554612: Not supporting attribute discovery, change record: https://www.drupal.org/node/3639484).
  • Legacy embed attributes: the filter's conversion of data-entity-embed-settings to data-entity-embed-display-settings, and data-entity-id lookups (with an update path for stored content, or a decision to keep them).
  • data-langcode: stop reading and writing it. #3116547: Host translation shows incorrect translation of embedded entity makes the filter ignore it in 8.x-1.x, so the embed follows the host text's language. In 2.0.x, remove it everywhere else:
    • EntityEmbedDialog: the translation lookup for the preview and the hidden data-langcode fields.
    • CKEditor 5: the drupalEntityLangCode attribute mapping in editing.js and <drupal-entity data-langcode> in the DrupalEntity plugin's elements.
    • EntityEmbedDisplayBase::getLangcode(): drop the fallback to the attribute, so it always returns the current content language.
    • An update hook that removes data-langcode from filter_html's allowed HTML in text formats, if it's still listed there once the CKEditor 5 plugin stops providing it.

    Stored content can keep the attribute, since nothing reads it. CKEditor 5 drops it the next time the content is edited.

Remaining tasks

  • Decide on the legacy attributes: drop them, or keep reading them and stop writing them.
  • File a child issue for each item, with a change record where it removes an API.

Comments

dave reid created an issue. See original summary.

dave reid’s picture

Issue summary: View changes
dave reid’s picture

Issue summary: View changes