You are here

function linkit_wysiwyg_plugin in Linkit 7.3

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

Implements hook_wysiwyg_plugin().

File

./linkit.module, line 1016
Main file for Linkit module.

Code

function linkit_wysiwyg_plugin($editor, $version) {
  $plugin = array();
  $plugin['linkit'] = array(
    'path' => drupal_get_path('module', 'linkit') . '/editors/' . $editor,
    'buttons' => array(
      'linkit' => t('Linkit'),
    ),
    'url' => 'http://drupal.org/project/linkit',
    'load' => TRUE,
  );

  // TinyMCE needs to know the filename.
  if ($editor == 'tinymce') {
    $plugin['linkit']['filename'] = 'editor_plugin.js';
  }

  // Add the linkit library for the editor.
  drupal_add_library('linkit', $editor);
  return $plugin;
}