Same name and namespace in other branches
  1. 8.9.x core/modules/editor/editor.module \editor_element_info_alter()
  2. 9 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 68
Adds bindings for client-side "text editors" to text formats.

Code

function editor_element_info_alter(&$types) {
  $types['text_format']['#pre_render'][] = 'element.editor:preRenderTextFormat';
}