You are here

function wysiwyg_fckeditor_settings_form in Wysiwyg 6.2

Same name and namespace in other branches
  1. 7.2 editors/fckeditor.inc \wysiwyg_fckeditor_settings_form()

Enhances the editor profile settings form for FCKeditor.

See also

http://docs.cksource.com/FCKeditor_2.x/Developers_Guide/Configuration/Co...

1 string reference to 'wysiwyg_fckeditor_settings_form'
wysiwyg_fckeditor_editor in editors/fckeditor.inc
Plugin implementation of hook_editor().

File

editors/fckeditor.inc, line 93
Editor integration functions for FCKeditor.

Code

function wysiwyg_fckeditor_settings_form(&$form, &$form_state) {
  $profile = $form_state['wysiwyg_profile'];
  $settings = $profile->settings;
  $settings += array(
    'AutoDetectPasteFromWord' => TRUE,
    'ForcePasteAsPlainText' => FALSE,
    'FontFormats' => 'p;address;pre;h2;h3;h4;h5;h6;div',
    'FormatOutput' => TRUE,
    'FormatSource' => TRUE,
  );
  $form['output']['FormatSource'] = array(
    '#type' => 'checkbox',
    '#title' => t('Apply source formatting'),
    '#default_value' => $settings['FormatSource'],
    '#return_value' => 1,
    '#description' => t('If enabled, the editor will re-format the HTML source code when switching to Source View.') . ' ' . t('Uses the <a href="@url">@setting</a> setting internally.', array(
      '@setting' => 'FormatSource',
      '@url' => url('http://docs.cksource.com/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options/FormatSource'),
    )),
  );
  $form['output']['FormatOutput'] = array(
    '#type' => 'checkbox',
    '#title' => t('Apply output formatting'),
    '#default_value' => $settings['FormatOutput'],
    '#return_value' => 1,
    '#description' => t('If enabled, the editor will re-format the HTML source code output. Disabling this option could avoid conflicts with other input filters.') . ' ' . t('Uses the <a href="@url">@setting</a> setting internally.', array(
      '@setting' => 'FormatOutput',
      '@url' => url('http://docs.cksource.com/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options/FormatOutput'),
    )),
  );
  $form['css']['FontFormats'] = array(
    '#type' => 'textfield',
    '#title' => t('Block formats'),
    '#default_value' => $settings['FontFormats'],
    '#size' => 40,
    '#maxlength' => 250,
    '#description' => t('Semicolon separated list of HTML block formats. Possible values: <code>@format-list</code>.', array(
      '@format-list' => 'p;h1;h2;h3;h4;h5;h6;div;address;pre',
    )) . ' ' . t('Uses the <a href="@url">@setting</a> setting internally.', array(
      '@setting' => 'FontFormats',
      '@url' => url('http://docs.cksource.com/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options/FontFormats'),
    )),
  );
  $form['paste'] = array(
    '#type' => 'fieldset',
    '#title' => t('Paste plugin'),
    '#description' => t('Settings for the paste plugin.'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
    '#group' => 'advanced',
  );
  $form['paste']['AutoDetectPasteFromWord'] = array(
    '#type' => 'checkbox',
    '#title' => t('Auto detect paste from Word'),
    '#default_value' => $settings['AutoDetectPasteFromWord'],
    '#return_value' => 1,
    '#description' => t('If enabled, FCKeditor checks if pasted text comes from MS Word. If so the editor will launch the "Paste from Word" window. <strong>Only works in Internet Explorer.</strong>') . ' ' . t('Uses the <a href="@url">@setting</a> setting internally.', array(
      '@setting' => 'AutoDetectPasteFromWord',
      '@url' => url('http://docs.cksource.com/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options/AutoDetectPasteFromWord'),
    )),
  );
  $form['paste']['ForcePasteAsPlainText'] = array(
    '#type' => 'checkbox',
    '#title' => t('Force paste as plain text'),
    '#default_value' => $settings['ForcePasteAsPlainText'],
    '#return_value' => 1,
    '#description' => t('If enabled, forces the editor to discard all formatting when pasting text. It will also disable the <strong>Paste from Word</strong> operation.') . ' ' . t('Uses the <a href="@url">@setting</a> setting internally.', array(
      '@setting' => 'ForcePasteAsPlainText',
      '@url' => url('http://docs.cksource.com/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options/ForcePasteAsPlainText'),
    )),
  );
}