You are here

function hook_ckeditor_plugin in CKEditor - WYSIWYG HTML editor 6

Same name and namespace in other branches
  1. 7 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 invocation of hook_ckeditor_plugin()
ckeditor_load_plugins in includes/ckeditor.lib.inc
List of CKEditor plugins

File

./ckeditor.api.php, line 39
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 path to the CKEditor plugins directory, with the trailing slash.
      'path' => drupal_get_path('module', 'my_module') . '/plugin_dir/',
      'buttons' => array(
        'button_name' => array(
          'icon' => 'path to button icon',
          'label' => 'Button Label',
        ),
      ),
    ),
  );
}