function wysiwyg_spellcheck_wysiwyg_plugin in Wysiwyg SpellCheck 6
Same name and namespace in other branches
- 7 wysiwyg_spellcheck.module \wysiwyg_spellcheck_wysiwyg_plugin()
Implementation of hook_wysiwyg_plugin().
File
- ./
wysiwyg_spellcheck.module, line 45 - wysiwyg_spellcheck is a plugin for wysiwyg editors
Code
function wysiwyg_spellcheck_wysiwyg_plugin($editor) {
$path = _wysiwyg_spellcheck_path($editor);
switch ($editor) {
case 'tinymce':
if (file_exists("{$path}/editor_plugin.js")) {
return array(
// SEE http://drupal.org/files/issues/wysiwyg_api_documentation.patch
'spellchecker' => array(
// SEE http://drupal.org/node/767550
'path' => $path,
'filename' => 'editor_plugin.js',
'buttons' => array(
'spellchecker' => t('Spell Check'),
),
'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker',
'load' => TRUE,
),
);
}
break;
case 'ckeditor':
if (file_exists("{$path}/plugin.js")) {
return array(
'aspell' => array(
'path' => $path,
'buttons' => array(
'SpellCheck' => t('Server Side Spell Check'),
),
'url' => 'http://cksource.com/forums/viewtopic.php?p=40830#p40830',
'load' => TRUE,
),
);
}
break;
}
}