You are here

function wysiwyg_yui_settings_form in Wysiwyg 6.2

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

Enhances the editor profile settings form for YUI.

See also

http://developer.yahoo.com/yui/docs/YAHOO.widget.Editor.html

1 string reference to 'wysiwyg_yui_settings_form'
wysiwyg_yui_editor in editors/yui.inc
Plugin implementation of hook_editor().

File

editors/yui.inc, line 125
Editor integration functions for YUI editor.

Code

function wysiwyg_yui_settings_form(&$form, &$form_state) {
  $profile = $form_state['wysiwyg_profile'];
  $settings = $profile->settings;
  $settings += array(
    'autoHeight' => FALSE,
    'block_formats' => 'p,h1,h2,h3,h4,h5,h6',
  );
  $form['basic']['language']['#access'] = FALSE;
  $form['appearance']['autoHeight'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable automatic height'),
    '#default_value' => $settings['autoHeight'],
    '#return_value' => 1,
    '#description' => t('When enabled, removes the scrollbars from the edit area and resizes it to fit the content.') . ' ' . t('Uses the <a href="@url">@setting</a> setting internally.', array(
      '@setting' => 'autoHeight',
      '@url' => url('http://developer.yahoo.com/yui/docs/YAHOO.widget.SimpleEditor.html#config_autoHeight'),
    )),
  );
  $form['css']['block_formats'] = array(
    '#type' => 'textfield',
    '#title' => t('Block formats'),
    '#default_value' => $settings['block_formats'],
    '#size' => 40,
    '#maxlength' => 250,
    '#description' => t('Comma separated list of HTML block formats. Possible values: <code>@format-list</code>.', array(
      '@format-list' => 'p,h1,h2,h3,h4,h5,h6,',
    )),
  );
}