function sheetnode_ckeditor_sheetnode_plugins in Sheetnode 7
Same name and namespace in other branches
- 5 modules/sheetnode_ckeditor/sheetnode_ckeditor.module \sheetnode_ckeditor_sheetnode_plugins()
- 6 modules/sheetnode_ckeditor/sheetnode_ckeditor.module \sheetnode_ckeditor_sheetnode_plugins()
- 7.2 modules/sheetnode_ckeditor/sheetnode_ckeditor.module \sheetnode_ckeditor_sheetnode_plugins()
Implementation of hook_sheetnode_plugins().
File
- modules/
sheetnode_ckeditor/ sheetnode_ckeditor.module, line 11 - Module file for the sheetnode_ckeditor module. This extends sheetnodes to allow inputting from CKeditor.
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');
}
}