W3cubDocs

/Drupal 8

function 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';
}

© 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!editor!editor.module/function/editor_element_info_alter/8.1.x