You are here

function hook_editor_info_alter in Drupal 9

Same name and namespace in other branches
  1. 8 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

1 function implements 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.

editor_test_editor_info_alter in core/modules/editor/tests/modules/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';
}