You are here

function wysiwyg_tinymce_editor in Wysiwyg 5.2

Same name and namespace in other branches
  1. 5 editors/tinymce.inc \wysiwyg_tinymce_editor()
  2. 6.2 editors/tinymce.inc \wysiwyg_tinymce_editor()
  3. 6 editors/tinymce.inc \wysiwyg_tinymce_editor()
  4. 7.2 editors/tinymce.inc \wysiwyg_tinymce_editor()

Plugin implementation of hook_editor().

@todo wysiwyg_<editor>_alter() to add/inject optional libraries like gzip.

File

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

Code

function wysiwyg_tinymce_editor() {
  $editor['tinymce'] = array(
    'title' => 'TinyMCE',
    'vendor url' => 'http://www.tinymce.com',
    'download url' => 'http://www.tinymce.com/download/download.php',
    'library path' => wysiwyg_get_path('tinymce') . '/jscripts/tiny_mce',
    'libraries' => array(
      '' => array(
        'title' => 'Minified',
        'files' => array(
          'tiny_mce.js',
        ),
      ),
      'src' => array(
        'title' => 'Source',
        'files' => array(
          'tiny_mce_src.js',
        ),
      ),
    ),
    'version callback' => 'wysiwyg_tinymce_version',
    'themes callback' => 'wysiwyg_tinymce_themes',
    'settings callback' => 'wysiwyg_tinymce_settings',
    'plugin callback' => 'wysiwyg_tinymce_plugins',
    'plugin settings callback' => 'wysiwyg_tinymce_plugin_settings',
    'proxy plugin' => array(
      'drupal' => array(
        'load' => TRUE,
        'proxy' => TRUE,
      ),
    ),
    'proxy plugin settings callback' => 'wysiwyg_tinymce_proxy_plugin_settings',
    'versions' => array(
      '2.1' => array(
        'js files' => array(
          'tinymce-2.js',
        ),
        'css files' => array(
          'tinymce-2.css',
        ),
        'download url' => 'http://sourceforge.net/project/showfiles.php?group_id=103281&package_id=111430&release_id=557383',
      ),
      // @todo Starting from 3.3, tiny_mce.js may support JS aggregation.
      '3.1' => array(
        'js files' => array(
          'tinymce-3.js',
        ),
        'css files' => array(
          'tinymce-3.css',
        ),
        'libraries' => array(
          '' => array(
            'title' => 'Minified',
            'files' => array(
              'tiny_mce.js' => array(
                'preprocess' => FALSE,
              ),
            ),
          ),
          'jquery' => array(
            'title' => 'jQuery',
            'files' => array(
              'tiny_mce_jquery.js',
            ),
          ),
          'src' => array(
            'title' => 'Source',
            'files' => array(
              'tiny_mce_src.js',
            ),
          ),
        ),
      ),
    ),
  );
  return $editor;
}