hook_editor_js_settings_alter(array &$settings)
Modifies JavaScript settings that are added for text editors.
Parameters
array $settings: All the settings that will be added to the page for the text formats to which a user has access.
Related topics
- Hooks
- Define functions that alter the behavior of Drupal core.
File
- core/modules/editor/editor.api.php, line 36
- Documentation for Text Editor API.
Code
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'); } }
Please login to continue.