You are here

function dnd_wysiwyg_plugin in Scald: Media Management made easy 6

Implementation of hook_wywiwyg_plugin().

File

dnd/dnd.module, line 155

Code

function dnd_wysiwyg_plugin($editor, $version = 0) {
  $plugins = array();
  switch ($editor) {
    case 'tinymce':
      if ($version > 3) {
        $plugins['forcecontainer'] = array(
          'title' => t('Force Container Plugin'),
          'description' => t('A custom plugin to forces a selection up to the outer container of a given element.'),
          'extensions' => array(
            'forcecontainer' => t('Force Container'),
          ),
          'path' => drupal_get_path('module', 'dnd') . '/js/tinymce/forcecontainer/editor_plugin_src.js',
          'load' => TRUE,
          'options' => array(
            'forcecontainer_class' => 'dnd-drop-wrapper',
            'forcecontainer_trigger_dnd' => TRUE,
          ),
        );
      }
      break;
  }
  return $plugins;
}