hook_editor_js_settings_alter(array &$settings)
Modifies JavaScript settings that are added for text editors.
array $settings: All the settings that will be added to the page for the text formats to which a user has access.
function hook_editor_js_settings_alter(array &$settings) { if (isset($settings['editor']['formats']['basic_html'])) { $settings['editor']['formats']['basic_html']['editor'] = 'MyDifferentEditor'; $settings['editor']['formats']['basic_html']['editorSettings']['buttons'] = array('strong', 'italic', 'underline'); } }
© 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.api.php/function/hook_editor_js_settings_alter/8.1.x