function mee_wysiwyg_plugin in Scald: Media Management made easy 7
Implements hook_wywiwyg_plugin().
File
- modules/
fields/ mee/ mee.module, line 79 - Defines a special textarea, with drag and drop media driven by Scald and dnd.module.
Code
function mee_wysiwyg_plugin($editor, $version) {
$plugins = array();
$mee_store_format = mee_store_format();
switch ($editor) {
case 'ckeditor':
if ($mee_store_format == 'sas') {
$plugins['dnd'] = array(
'path' => drupal_get_path('module', 'mee') . '/plugins/ckeditor',
'filename' => 'plugin.js',
'buttons' => array(
'dnd' => t('Scald DnD integration'),
),
'load' => TRUE,
);
}
elseif ($mee_store_format == 'embed_div') {
$plugins['dndck4'] = array(
'path' => drupal_get_path('module', 'mee') . '/plugins/dndck4',
'filename' => 'plugin.js',
'buttons' => array(
'dndck4' => t('Scald DnD integration - CKEditor 4 widgets'),
),
'load' => TRUE,
);
}
break;
}
return $plugins;
}