function EditorHooks::elementInfoAlter
Implements hook_element_info_alter().
Extends the functionality of text_format elements (provided by Filter module), so that selecting a text format notifies a client-side text editor when it should be enabled or disabled.
See also
\Drupal\filter\Element\TextFormat
File
-
core/
modules/ editor/ src/ Hook/ EditorHooks.php, line 78
Class
- EditorHooks
- Hook implementations for editor.
Namespace
Drupal\editor\HookCode
public function elementInfoAlter(&$types) {
$types['text_format']['#pre_render'][] = 'element.editor:preRenderTextFormat';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.