You are here

function ckeditor_settings_form_submit in CKEditor for WYSIWYG Module 7

Additional submit handler for filter_admin_format_form().

1 string reference to 'ckeditor_settings_form_submit'
ckeditor_settings_form in includes/ckeditor.admin.inc
Editor settings callback; Provide options for CKEditor module.

File

includes/ckeditor.admin.inc, line 54

Code

function ckeditor_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);
}