function hook_edit_editor_alter

Allow modules to alter in-place editor plugin metadata.

This hook is called after the in-place editor plugins have been discovered, but before they are cached. Hence any alterations will be cached.

Parameters

array &$editors: An array of informations on existing in-place editors, as collected by the annotation discovery mechanism.

See also

\Drupal\edit\Annotation\InPlaceEditor

\Drupal\edit\Plugin\EditorManager

Related topics

File

drupal/core/modules/edit/edit.api.php, line 26
Hooks provided by the Edit module.

Code

function hook_edit_editor_alter(&$editors) {

  // Cleanly override editor.module's in-place editor plugin.
  $editors['editor']['class'] = 'Drupal\\advanced_editor\\Plugin\\edit\\editor\\AdvancedEditor';
}