You are here

function ckeditor_htmlbuttons_wysiwyg_plugin in CKEditor HTML Buttons (for WYSIWYG and CKEditor) 7

Implements hook_wysiwyg_plugin().

File

./ckeditor_htmlbuttons.wysiwyg.inc, line 36
Init buttons for Wysiwyg module.

Code

function ckeditor_htmlbuttons_wysiwyg_plugin($editor, $version) {
  if ($editor == 'ckeditor') {
    $buttons = ckeditor_htmlbutton_load_all();
    $buttons_wysiwyg_arr = array();
    foreach ($buttons as $key => $var) {
      $buttons_wysiwyg_arr[$var['name']] = 'HTML Buttons ' . $var['title'];
    }
    return array(
      'htmlbuttons' => array(
        'url' => 'https://www.drupal.org/project/ckeditor_htmlbuttons',
        'path' => drupal_get_path('module', 'ckeditor_htmlbuttons') . '/ckeditor/htmlbuttons',
        'buttons' => $buttons_wysiwyg_arr,
        'load' => TRUE,
      ),
    );
  }
}