Replace deprecated function editor_load() for 11.2

Created on 21 July 2025, about 1 month ago

Problem/Motivation

The function editor_load() is deprecated in 11.2.0.
See: https://www.drupal.org/node/3509245
There are some usages of the function in:

  • ckeditor5_premium_features.module
  • modules/ckeditor5_premium_features_ai_assistant/src/Form/CKEditor5AiCommandGroupForm.php
  • modules/ckeditor5_premium_features_productivity_pack/src/Form/ContentTemplates/CKEditor5TemplateEntityForm.php

It should be replaced.

Steps to reproduce

Proposed resolution

Replace:
$editor = editor_load($format->id());
with:
$editor = \Drupal\editor\Entity\Editor::load($format_id);
or
$editor = $this->entityTypeManager->getStorage('editor')->load($format->id());

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

1.5

Component

Code

Created by

🇩🇪Germany lmoeni

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024