You are here

function mee_ckeditor_plugin in Scald: Media Management made easy 7

Implements hook_ckeditor_plugin().

File

modules/fields/mee/mee.module, line 113
Defines a special textarea, with drag and drop media driven by Scald and dnd.module.

Code

function mee_ckeditor_plugin() {
  $plugins = array();
  $mee_store_format = mee_store_format();
  if ($mee_store_format == 'sas') {
    $plugins['dnd'] = array(
      'name' => 'dnd',
      'desc' => t('Scald Drag and Drop integration'),
      'path' => drupal_get_path('module', 'mee') . '/plugins/ckeditor/',
      'buttons' => array(
        'ScaldAtom' => array(
          'icon' => 'icons/atom.png',
          'label' => t('Edit atom properties'),
        ),
      ),
    );
  }
  elseif ($mee_store_format == 'embed_div' && version_compare(ckeditor_get_version(), '4.3.0') >= 0) {
    $plugins['dndck4'] = array(
      'name' => 'dndck4',
      'desc' => t('Scald Drag and Drop integration - CKEditor 4 widgets'),
      'path' => drupal_get_path('module', 'mee') . '/plugins/dndck4/',
      'buttons' => array(
        'ScaldAtom' => array(
          'icon' => 'icons/atom.png',
          'label' => t('Edit atom properties'),
        ),
      ),
    );
  }
  return $plugins;
}