You are here

function hook_ckeditor_plugin in CKEditor - WYSIWYG HTML editor 7

Same name and namespace in other branches
  1. 6 ckeditor.api.php \hook_ckeditor_plugin()

Hook to register the CKEditor plugin - it would appear in the plugins list on the profile setting page.

1 function implements hook_ckeditor_plugin()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

ckeditor_ckeditor_plugin in ./ckeditor.ckeditor.inc
Implements hook_ckeditor_plugin().
1 invocation of hook_ckeditor_plugin()
ckeditor_load_plugins in includes/ckeditor.lib.inc
List of CKEditor plugins.

File

./ckeditor.api.php, line 40
CKEditor - The text editor for the Internet - http://ckeditor.com Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.

Code

function hook_ckeditor_plugin() {
  return array(
    'plugin_name' => array(
      // Name of the plugin used to write it.
      'name' => 'plugin_name',
      // Description of the plugin - it would be displayed in the plugins management section of profile settings.
      'desc' => t('Plugin description'),
      // The full URL to the CKEditor plugins directory, with the trailing slash.
      'path' => base_path() . drupal_get_path('module', 'my_module') . '/plugin_dir/',
      'buttons' => array(
        'button_name' => array(
          // Path to the button icon. Relative to the plugin directory 'path' unless 'icon_path' is specified.
          'icon' => 'icon/plugin_name.png',
          // Optional full path to the directory the icon is located in.
          'icon_path' => base_path() . drupal_get_path('theme', 'my_theme') . '/icon_dir/',
          'label' => 'Button Label',
        ),
      ),
    ),
  );
}