You are here

function wysiwyg_tinymce_plugins in Wysiwyg 5.2

Same name and namespace in other branches
  1. 5 editors/tinymce.inc \wysiwyg_tinymce_plugins()
  2. 6 editors/tinymce.inc \wysiwyg_tinymce_plugins()

Return internal plugins for this editor; semi-implementation of hook_wysiwyg_plugin().

1 string reference to 'wysiwyg_tinymce_plugins'
wysiwyg_tinymce_editor in editors/tinymce.inc
Plugin implementation of hook_editor().

File

editors/tinymce.inc, line 372
Editor integration functions for TinyMCE.

Code

function wysiwyg_tinymce_plugins($editor) {
  $plugins = array(
    'default' => array(
      'path' => $editor['library path'] . '/themes/advanced',
      'buttons' => array(
        'bold' => t('Bold'),
        'italic' => t('Italic'),
        'underline' => t('Underline'),
        'strikethrough' => t('Strike-through'),
        'justifyleft' => t('Align left'),
        'justifycenter' => t('Align center'),
        'justifyright' => t('Align right'),
        'justifyfull' => t('Justify'),
        'bullist' => t('Bullet list'),
        'numlist' => t('Numbered list'),
        'outdent' => t('Outdent'),
        'indent' => t('Indent'),
        'undo' => t('Undo'),
        'redo' => t('Redo'),
        'link' => t('Link'),
        'unlink' => t('Unlink'),
        'anchor' => t('Anchor'),
        'image' => t('Image'),
        'cleanup' => t('Clean-up'),
        'formatselect' => t('Block format'),
        'styleselect' => t('Styles'),
        'fontselect' => t('Font'),
        'fontsizeselect' => t('Font size'),
        'forecolor' => t('Forecolor'),
        'backcolor' => t('Backcolor'),
        'sup' => t('Superscript'),
        'sub' => t('Subscript'),
        'blockquote' => t('Blockquote'),
        'code' => t('Source code'),
        'hr' => t('Horizontal rule'),
        'cut' => t('Cut'),
        'copy' => t('Copy'),
        'paste' => t('Paste'),
        'visualaid' => t('Visual aid'),
        'removeformat' => t('Remove format'),
        'charmap' => t('Character map'),
        'help' => t('Help'),
      ),
      'internal' => TRUE,
    ),
    'advhr' => array(
      'path' => $editor['library path'] . '/plugins/advhr',
      'buttons' => array(
        'advhr' => t('Advanced horizontal rule'),
      ),
      'extended_valid_elements' => array(
        'hr[class|width|size|noshade]',
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:advhr',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'advimage' => array(
      'path' => $editor['library path'] . '/plugins/advimage',
      'extensions' => array(
        'advimage' => t('Advanced image'),
      ),
      'extended_valid_elements' => array(
        'img[src|alt|title|align|width|height|usemap|hspace|vspace|border|style|class|onmouseover|onmouseout|id|name|longdesc]',
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:advimage',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'advlink' => array(
      'path' => $editor['library path'] . '/plugins/advlink',
      'extensions' => array(
        'advlink' => t('Advanced link'),
      ),
      'extended_valid_elements' => array(
        'a[name|href|target|title|class|onfocus|onblur|onclick|ondlbclick|onmousedown|onmouseup|onmouseover|onmouseout|onkeypress|onkeydown|onkeyup|id|style|rel]',
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:advlink',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'autosave' => array(
      'path' => $editor['library path'] . '/plugins/autosave',
      'extensions' => array(
        'autosave' => t('Auto save'),
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:autosave',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'contextmenu' => array(
      'path' => $editor['library path'] . '/plugins/contextmenu',
      'extensions' => array(
        'contextmenu' => t('Context menu'),
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:contextmenu',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'directionality' => array(
      'path' => $editor['library path'] . '/plugins/directionality',
      'buttons' => array(
        'ltr' => t('Left-to-right'),
        'rtl' => t('Right-to-left'),
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:directionality',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'emotions' => array(
      'path' => $editor['library path'] . '/plugins/emotions',
      'buttons' => array(
        'emotions' => t('Emotions'),
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:emotions',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'fullscreen' => array(
      'path' => $editor['library path'] . '/plugins/fullscreen',
      'buttons' => array(
        'fullscreen' => t('Fullscreen'),
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:fullscreen',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'inlinepopups' => array(
      'path' => $editor['library path'] . '/plugins/inlinepopups',
      'extensions' => array(
        'inlinepopups' => t('Inline popups'),
      ),
      'options' => array(
        'dialog_type' => array(
          'modal',
        ),
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:inlinepopups',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'insertdatetime' => array(
      'path' => $editor['library path'] . '/plugins/insertdatetime',
      'buttons' => array(
        'insertdate' => t('Insert date'),
        'inserttime' => t('Insert time'),
      ),
      'options' => array(
        'plugin_insertdate_dateFormat' => '%Y-%m-%d',
        'plugin_insertdate_timeFormat' => '%H:%M:%S',
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:insertdatetime',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'layer' => array(
      'path' => $editor['library path'] . '/plugins/layer',
      'buttons' => array(
        'insertlayer' => t('Insert layer'),
        'moveforward' => t('Move forward'),
        'movebackward' => t('Move backward'),
        'absolute' => t('Absolute'),
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:layer',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'paste' => array(
      'path' => $editor['library path'] . '/plugins/paste',
      'buttons' => array(
        'pastetext' => t('Paste text'),
        'pasteword' => t('Paste from Word'),
        'selectall' => t('Select all'),
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:paste',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'preview' => array(
      'path' => $editor['library path'] . '/plugins/preview',
      'buttons' => array(
        'preview' => t('Preview'),
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:preview',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'print' => array(
      'path' => $editor['library path'] . '/plugins/print',
      'buttons' => array(
        'print' => t('Print'),
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:print',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'searchreplace' => array(
      'path' => $editor['library path'] . '/plugins/searchreplace',
      'buttons' => array(
        'search' => t('Search'),
        'replace' => t('Replace'),
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:searchreplace',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'style' => array(
      'path' => $editor['library path'] . '/plugins/style',
      'buttons' => array(
        'styleprops' => t('Advanced CSS styles'),
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:style',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'table' => array(
      'path' => $editor['library path'] . '/plugins/table',
      'buttons' => array(
        'tablecontrols' => t('Table'),
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:table',
      'internal' => TRUE,
      'load' => TRUE,
    ),
  );
  if (version_compare($editor['installed version'], '3', '<')) {
    $plugins['flash'] = array(
      'path' => $editor['library path'] . '/plugins/flash',
      'buttons' => array(
        'flash' => t('Flash'),
      ),
      'extended_valid_elements' => array(
        'img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|obj|param|embed]',
      ),
      'internal' => TRUE,
      'load' => TRUE,
    );
  }
  if (version_compare($editor['installed version'], '2.0.6', '>')) {
    $plugins['media'] = array(
      'path' => $editor['library path'] . '/plugins/media',
      'buttons' => array(
        'media' => t('Media'),
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:media',
      'internal' => TRUE,
      'load' => TRUE,
    );
    $plugins['xhtmlxtras'] = array(
      'path' => $editor['library path'] . '/plugins/xhtmlxtras',
      'buttons' => array(
        'cite' => t('Citation'),
        'del' => t('Deleted'),
        'abbr' => t('Abbreviation'),
        'acronym' => t('Acronym'),
        'ins' => t('Inserted'),
        'attribs' => t('HTML attributes'),
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:xhtmlxtras',
      'internal' => TRUE,
      'load' => TRUE,
    );
  }
  if (version_compare($editor['installed version'], '3', '>')) {
    $plugins['bbcode'] = array(
      'path' => $editor['library path'] . '/plugins/bbcode',
      'extensions' => array(
        'bbcode' => t('BBCode'),
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:bbcode',
      'internal' => TRUE,
      'load' => TRUE,
    );
    if (version_compare($editor['installed version'], '3.3', '<')) {
      $plugins['safari'] = array(
        'path' => $editor['library path'] . '/plugins/safari',
        'extensions' => array(
          'safari' => t('Safari compatibility'),
        ),
        'internal' => TRUE,
        'load' => TRUE,
      );
    }
  }
  if (version_compare($editor['installed version'], '3.2.5', '>=')) {
    $plugins['autoresize'] = array(
      'path' => $editor['library path'] . '/plugins/autoresize',
      'extensions' => array(
        'autoresize' => t('Auto resize'),
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:autoresize',
      'internal' => TRUE,
      'load' => TRUE,
    );
  }
  if (version_compare($editor['installed version'], '3.3', '>=')) {
    $plugins['advlist'] = array(
      'path' => $editor['library path'] . '/plugins/advlist',
      'extensions' => array(
        'advlist' => t('Advanced list'),
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:advlist',
      'internal' => TRUE,
      'load' => TRUE,
    );
  }
  if (version_compare($editor['installed version'], '3.2.6', '>=')) {
    $plugins['wordcount'] = array(
      'path' => $editor['library path'] . '/plugins/wordcount',
      'extensions' => array(
        'wordcount' => t('Word count'),
      ),
      'internal' => TRUE,
      'load' => TRUE,
    );
  }
  if (version_compare($editor['installed version'], '3.4.1', '>=')) {
    $plugins['lists'] = array(
      'path' => $editor['library path'] . 'plugins/lists',
      'extensions' => array(
        'lists' => t('List normalizer'),
      ),
      'url' => 'http://www.tinymce.com/wiki.php/Plugin:lists',
      'internal' => TRUE,
      'load' => TRUE,
      'extended_valid_elements' => array(
        'li[class|dir|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title|type|value]',
        'ol[class|compact|dir|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|start|style|title|type]',
        'ul[class|compact|dir|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title|type]',
      ),
    );
  }
  return $plugins;
}