Same name and namespace in other branches
  1. 8.9.x core/modules/editor/editor.api.php \hook_editor_info_alter()
  2. 9 core/modules/editor/editor.api.php \hook_editor_info_alter()

Performs alterations on text editor definitions.

Parameters

array $editors: An array of metadata of text editors, as collected by the plugin annotation discovery mechanism.

See also

\Drupal\editor\Plugin\EditorBase

Related topics

2 functions implement hook_editor_info_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

ckeditor_test_editor_info_alter in core/modules/ckeditor5/tests/modules/ckeditor_test/ckeditor_test.module
Implements hook_editor_info_alter().
editor_test_editor_info_alter in core/modules/editor/tests/modules/editor_test/editor_test.module
Implements hook_editor_info_alter().
1 invocation of hook_editor_info_alter()
EditorManager::__construct in core/modules/editor/src/Plugin/EditorManager.php
Constructs an EditorManager object.

File

core/modules/editor/editor.api.php, line 24
Documentation for Text Editor API.

Code

function hook_editor_info_alter(array &$editors) {
  $editors['some_other_editor']['label'] = t('A different name');
  $editors['some_other_editor']['library']['module'] = 'my_editor_override';
}