You are here

function tinymce_settings_form_submit in TinyMCE 7

Additional submit handler for filter_admin_format_form().

1 string reference to 'tinymce_settings_form_submit'
tinymce_settings_form in ./tinymce.module
Editor settings callback; Provide options for TinyMCE module.

File

./tinymce.module, line 553

Code

function tinymce_settings_form_submit($form, &$form_state) {
  $settings = $form_state['values']['editor_settings'];
  form_set_value($form['editor_settings']['toolbar']['toolbar'], json_decode($settings['toolbar'], FALSE), $form_state);
  $format_list = array();
  foreach (explode(',', $settings['format_list']) as $format) {
    $format_list[] = trim($format);
  }
  form_set_value($form['editor_settings']['toolbar']['format_list'], $format_list, $form_state);
  $styles = array();
  foreach (explode("\n", $settings['style_list']) as $style) {
    $styles[] = trim($style);
  }
  form_set_value($form['editor_settings']['toolbar']['style_list'], $styles, $form_state);
}