editor_element_info_alter

editor_element_info_alter(&$types)

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 64
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';
}
doc_Drupal
2016-10-29 09:03:54
Comments
Leave a Comment

Please login to continue.