function editor_element_info_alter

Same name and namespace in other branches
  1. 9 core/modules/editor/editor.module \editor_element_info_alter()
  2. 8.9.x core/modules/editor/editor.module \editor_element_info_alter()
  3. 10 core/modules/editor/editor.module \editor_element_info_alter()

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/editor.module, line 67

Code

function editor_element_info_alter(&$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.