diff --git a/core/modules/ckeditor5/ckeditor5.module b/core/modules/ckeditor5/ckeditor5.module index e2620d0ff6..f9ac42891c 100644 --- a/core/modules/ckeditor5/ckeditor5.module +++ b/core/modules/ckeditor5/ckeditor5.module @@ -17,11 +17,13 @@ use Drupal\Core\Ajax\ReplaceCommand; use Drupal\Core\Ajax\RemoveCommand; use Drupal\Core\Asset\AttachedAssetsInterface; +use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Language\LanguageInterface; use Drupal\Core\Render\Element; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Url; +use Drupal\editor\Entity\Editor; use Symfony\Component\Validator\Constraints\Choice; /** @@ -652,8 +654,8 @@ function _ckeditor5_theme_css($theme = NULL): array { /** * Implements hook_entity_presave(). */ -function ckeditor5_entity_presave(\Drupal\Core\Entity\EntityInterface $entity) { - if ($entity instanceof \Drupal\editor\Entity\Editor) { +function ckeditor5_entity_presave(EntityInterface $entity) { + if ($entity instanceof Editor) { $settings = $entity->getSettings(); if (in_array('codeBlock', $settings['toolbar']['items'], TRUE) && !isset($settings['plugins']['ckeditor5_codeBlock'])) { // @see \Drupal\ckeditor5\Plugin\CKEditor5Plugin\CodeBlock::defaultConfiguration()