function wysiwyg_tinymce_editor in Wysiwyg 6
Same name and namespace in other branches
- 5.2 editors/tinymce.inc \wysiwyg_tinymce_editor()
- 5 editors/tinymce.inc \wysiwyg_tinymce_editor()
- 6.2 editors/tinymce.inc \wysiwyg_tinymce_editor()
- 7.2 editors/tinymce.inc \wysiwyg_tinymce_editor()
Plugin implementation of hook_editor().
- Function signature and returned editor name nust match include filename.
- Returns an array of supported editor versions along with support files.
@todo wysiwyg_<editor>_alter() to add/inject optional libraries like gzip.
File
- editors/
tinymce.inc, line 12
Code
function wysiwyg_tinymce_editor() {
$editor = array();
$editor['tinymce'] = array(
// Required properties
'title' => 'TinyMCE',
'vendor url' => 'http://tinymce.moxiecode.com',
'download url' => 'http://tinymce.moxiecode.com/download.php',
'library path' => wysiwyg_get_path('tinymce') . '/jscripts/tiny_mce',
'libraries' => array(
// We cannot assume that all editors need just one js library.
'' => array(
// Key may be used in wysiwyg_tinymce_settings() for exec mode.
'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',
'versions' => array(
// Each version can override global editor properties.
'2.1' => array(
// 'include files' => array('tinymce-2.inc'),
'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',
),
'3.1' => array(
// 'include files' => array('tinymce-3.inc'),
'js files' => array(
'tinymce-3.js',
),
'css files' => array(
'tinymce-3.css',
),
// 'plugin callback' => 'wysiwyg_tinymce_3_plugins',
'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;
}