You are here

function wysiwyg_tinymce_plugins in Wysiwyg 6

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

Return internal plugins for TinyMCE; 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 343

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'),
        'forecolor' => t('Forecolor'),
        'backcolor' => t('Backcolor'),
        'sup' => t('Sup'),
        'sub' => t('Sub'),
        '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://wiki.moxiecode.com/index.php/TinyMCE:Plugins/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|hspace|vspace|border|style|class|onmouseover|onmouseout|id|name]',
      ),
      'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/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://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'autosave' => array(
      'path' => $editor['library path'] . '/plugins/autosave',
      'extensions' => array(
        'autosave' => t('Auto save'),
      ),
      'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'contextmenu' => array(
      'path' => $editor['library path'] . '/plugins/contextmenu',
      'extensions' => array(
        'contextmenu' => t('Context menu'),
      ),
      'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/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://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'emotions' => array(
      'path' => $editor['library path'] . '/plugins/emotions',
      'buttons' => array(
        'emotions' => t('Emotions'),
      ),
      'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    '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]',
      ),
      'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/flash',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'font' => array(
      'path' => $editor['library path'] . '/plugins/font',
      'buttons' => array(
        'formatselect' => t('HTML block format'),
        'fontselect' => t('Font'),
        'fontsizeselect' => t('Font size'),
        'styleselect' => t('Font style'),
      ),
      'extended_valid_elements' => array(
        'font[face|size|color|style],span[class|align|style]',
      ),
      'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/font',
      'internal' => TRUE,
    ),
    'fullscreen' => array(
      'path' => $editor['library path'] . '/plugins/fullscreen',
      'buttons' => array(
        'fullscreen' => t('Fullscreen'),
      ),
      'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/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://wiki.moxiecode.com/index.php/TinyMCE:Plugins/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' => array(
          '%Y-%m-%d',
        ),
        'plugin_insertdate_timeFormat' => array(
          '%H:%M:%S',
        ),
      ),
      'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/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://wiki.moxiecode.com/index.php/TinyMCE:Plugins/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://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'preview' => array(
      'path' => $editor['library path'] . '/plugins/preview',
      'buttons' => array(
        'preview' => t('Preview'),
      ),
      'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'print' => array(
      'path' => $editor['library path'] . '/plugins/print',
      'buttons' => array(
        'print' => t('Print'),
      ),
      'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'searchreplace' => array(
      'path' => $editor['library path'] . '/plugins/searchreplace',
      'buttons' => array(
        'search' => t('Search'),
        'replace' => t('Replace'),
      ),
      'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'style' => array(
      'path' => $editor['library path'] . '/plugins/style',
      'buttons' => array(
        'styleprops' => t('Style properties'),
      ),
      'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style',
      'internal' => TRUE,
      'load' => TRUE,
    ),
    'table' => array(
      'path' => $editor['library path'] . '/plugins/table',
      'buttons' => array(
        'tablecontrols' => t('Table'),
      ),
      'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/table',
      'internal' => TRUE,
      'load' => TRUE,
    ),
  );
  if ($editor['installed version'] > 3) {
    $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'),
      ),
      'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras',
      'internal' => TRUE,
      'load' => TRUE,
    );
    $plugins['safari'] = array(
      'path' => $editor['library path'] . '/plugins/safari',
      'extensions' => array(
        'safari' => t('Safari compatibility'),
      ),
      'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/safari',
      'internal' => TRUE,
      'load' => TRUE,
    );
  }
  return $plugins;
}