Change record status: 
Project: 
Introduced in branch: 
11.3.x
Introduced in version: 
11.3.0
Description: 

An exciting new feature has been added to core, if you've used the Linkit module this will look very familiar.

To enable the Entity Links filter, edit your Text format filters that uses a CKEditor 5 editor and enable the Entity Links filter.

Entity links filter

By default, only Node entities are exposed as link suggestions.

Other entity types can be enabled via hook_entity_bundle_info_alter.

For example, you could enable link suggestions for all media and taxonomy bundles like so:

<?php

declare(strict_types=1);

namespace Drupal\my_module\Hook;

use Drupal\Core\Hook\Attribute\Hook;

/**
 * Hook implementations for my_module.
 */
class MyModuleHooks {

  /**
   * Implements hook_entity_bundle_info_alter().
   */
  #[Hook('entity_bundle_info_alter')]
  public function entityBundleInfoAlter(array &$bundles): void {
    if (isset($bundles['taxonomy_term'])) {
      foreach ($bundles['taxonomy_term'] as $key => $bundle) {
        $bundles['taxonomy_term'][$key]['ckeditor5_link_suggestions'] = TRUE;
      }
    }

    if (isset($bundles['media'])) {
      foreach ($bundles['media'] as $key => $bundle) {
        $bundles['media'][$key]['ckeditor5_link_suggestions'] = TRUE;
      }
    }
  }

}
Impacts: 
Site builders, administrators, editors
Module developers