You are here

function wysiwyg_tinymce_editor in Wysiwyg 7.2

Same name and namespace in other branches
  1. 5.2 editors/tinymce.inc \wysiwyg_tinymce_editor()
  2. 5 editors/tinymce.inc \wysiwyg_tinymce_editor()
  3. 6.2 editors/tinymce.inc \wysiwyg_tinymce_editor()
  4. 6 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' => 'https://www.tinymce.com',
    'download url' => 'https://www.tiny.cloud/get-tiny/self-hosted/',
    'library path' => wysiwyg_get_path('tinymce'),
    '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',
    'verified version range' => array(
      '3.3.9.2',
      '4.9.11',
    ),
    'themes callback' => 'wysiwyg_tinymce_themes',
    'settings form callback' => 'wysiwyg_tinymce_settings_form',
    'init callback' => 'wysiwyg_tinymce_init',
    'settings callback' => 'wysiwyg_tinymce_settings',
    'plugin callback' => '_wysiwyg_tinymce_plugins',
    'plugin meta callback' => '_wysiwyg_tinymce_plugin_meta',
    'migrate settings callback' => '_wysiwyg_tinymce_migrate_settings',
    'proxy plugin' => array(
      'drupal' => array(
        'load' => TRUE,
        'proxy' => TRUE,
      ),
    ),
    'proxy plugin settings callback' => '_wysiwyg_tinymce_proxy_plugin_settings',
    'versions' => array(
      '3.3' => array(
        'js files' => array(
          'tinymce-3.js',
        ),
        'library path' => wysiwyg_get_path('tinymce') . '/jscripts/tiny_mce',
        'css files' => array(
          'tinymce-3.css',
        ),
        'libraries' => array(
          '' => array(
            'title' => 'Minified',
            'files' => array(
              // Some versions can not be aggregated.
              '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',
            ),
          ),
        ),
      ),
      '4' => array(
        'js files' => array(
          'tinymce-4.js',
        ),
        'css files' => array(
          'tinymce-4.css',
        ),
        'library path' => wysiwyg_get_path('tinymce') . '/js/tinymce',
        'libraries' => array(
          'min' => array(
            'title' => 'Minified',
            'files' => array(
              'tinymce.min.js',
            ),
          ),
        ),
      ),
    ),
  );
  return $editor;
}