You are here

function linkit_wysiwyg_plugin in Linkit 6

Same name and namespace in other branches
  1. 7.3 linkit.module \linkit_wysiwyg_plugin()
  2. 7 linkit.module \linkit_wysiwyg_plugin()
  3. 7.2 linkit.module \linkit_wysiwyg_plugin()

File

./linkit.module, line 382
Main file for linkit module.

Code

function linkit_wysiwyg_plugin($editor, $version) {
  $plugins = array();
  _linkit_add_settings('wysiwyg_' . $editor);
  switch ($editor) {
    case 'tinymce':
      $plugins['linkit'] = array(
        'path' => drupal_get_path('module', 'linkit') . '/editors/tinymce/',
        'filename' => 'editor_plugin.js',
        'buttons' => array(
          'linkit' => t('Linkit'),
        ),
        'url' => 'http://drupal.org/project/linkit',
        'load' => TRUE,
      );
      break;
    case 'ckeditor':

      // notice: Big "L" in the name here! important
      $plugins['Linkit'] = array(
        'path' => drupal_get_path('module', 'linkit') . '/editors/ckeditor/',
        'buttons' => array(
          'Linkit' => t('Linkit'),
        ),
        'url' => 'http://drupal.org/project/linkit',
        'load' => TRUE,
      );
      break;
    case 'fckeditor':
      $plugins['linkit'] = array(
        'path' => drupal_get_path('module', 'linkit') . '/editors/fckeditor/',
        'buttons' => array(
          'linkit' => t('Linkit'),
        ),
        'url' => 'http://drupal.org/project/linkit',
        'load' => TRUE,
      );
      break;
  }
  return $plugins;
}