function editor_test_editor_js_settings_alter

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

Implements hook_editor_js_settings_alter().

File

core/modules/editor/tests/modules/editor_test/editor_test.module, line 50

Code

function editor_test_editor_js_settings_alter(&$settings) {
    // 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.