function EditorTestHooks::editorJsSettingsAlter

Implements hook_editor_js_settings_alter().

Attributes

#[Hook('editor_js_settings_alter')]

File

core/modules/editor/tests/modules/editor_test/src/Hook/EditorTestHooks.php, line 52

Class

EditorTestHooks
Hook implementations for editor_test.

Namespace

Drupal\editor_test\Hook

Code

public function editorJsSettingsAlter(&$settings) : void {
  // Allow tests to enable or disable this alter hook.
  if (!\Drupal::state()->get('editor_test_js_settings_alter_enabled', FALSE)) {
    return;
  }
  if (isset($settings['editor']['formats']['full_html'])) {
    $settings['editor']['formats']['full_html']['editorSettings']['ponyModeEnabled'] = FALSE;
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.