You are here

function sheetnode_ckeditor_sheetnode_plugins in Sheetnode 6

Same name and namespace in other branches
  1. 5 modules/sheetnode_ckeditor/sheetnode_ckeditor.module \sheetnode_ckeditor_sheetnode_plugins()
  2. 7.2 modules/sheetnode_ckeditor/sheetnode_ckeditor.module \sheetnode_ckeditor_sheetnode_plugins()
  3. 7 modules/sheetnode_ckeditor/sheetnode_ckeditor.module \sheetnode_ckeditor_sheetnode_plugins()

Implementation of hook_sheetnode_plugins().

File

modules/sheetnode_ckeditor/sheetnode_ckeditor.module, line 6

Code

function sheetnode_ckeditor_sheetnode_plugins() {
  drupal_add_js(variable_get('sheetnode_ckeditor_library_path', drupal_get_path('module', 'sheetnode_ckeditor') . '/ckeditor') . '/ckeditor.js');
  drupal_add_js(drupal_get_path('module', 'sheetnode_ckeditor') . '/sheetnode_ckeditor.js');
  $toolbar = array(
    array(
      'Cut',
      'Copy',
      'Paste',
      'PasteText',
      'PasteFromWord',
      '-',
      'Scayt',
    ),
    array(
      'Undo',
      'Redo',
      '-',
      'Find',
      'Replace',
      '-',
      'SelectAll',
      'RemoveFormat',
    ),
    '/',
    array(
      'Font',
      'FontSize',
      'TextColor',
      'BGColor',
    ),
    array(
      'Bold',
      'Italic',
      'Underline',
      'Strike',
    ),
    array(
      'Link',
      'Unlink',
    ),
  );
  drupal_alter('sheetnode_ckeditor_toolbar', $toolbar);
  static $once = FALSE;
  if (!$once) {
    $once = TRUE;
    drupal_add_js(array(
      'sheetnodeCK' => array(
        'imagePrefix' => base_path() . drupal_get_path('module', 'sheetnode_ckeditor') . '/images',
        'toolbar' => $toolbar,
      ),
    ), 'setting');
  }
}