W3cubDocs

/Drupal 8

function hook_quickedit_editor_alter

hook_quickedit_editor_alter(&$editors)

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 metadata on existing in-place editors, as collected by the annotation discovery mechanism.

See also

\Drupal\quickedit\Annotation\InPlaceEditor

\Drupal\quickedit\Plugin\EditorManager

Related topics

Hooks
Define functions that alter the behavior of Drupal core.

File

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

Code

function hook_quickedit_editor_alter(&$editors) {
  // Cleanly override editor.module's in-place editor plugin.
  $editors['editor']['class'] = 'Drupal\advanced_editor\Plugin\quickedit\editor\AdvancedEditor';
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!quickedit!quickedit.api.php/function/hook_quickedit_editor_alter/8.1.x