1 filter.api.php hook_filter_js_settings_alter(&$settings)

Perform alterations on the JavaScript settings that are added for filters.

Note that changing settings here only affects the client side behavior of the filter. To affect the filter globally both on the client side and server side, use hook_filter_info_alter().

Parameters

array $settings: All the settings that will be added to the page via backdrop_add_js() for the text formats to which a user has access.

Related topics

File

core/modules/filter/filter.api.php, line 187
Hooks provided by the Filter module.

Code

function hook_filter_js_settings_alter(&$settings) {
  $settings['full_html']['allowed_tags'][] = 'strong';
  $settings['full_html']['allowed_tags'][] = 'em';
  $settings['full_html']['allowed_tags'][] = 'img';
}