View source
<?php
function ckeditor_tabber_page_alter() {
drupal_add_js(array(
'ckeditor_tabber' => array(
'elements' => variable_get('ckeditor_tabber_semantic_tabs_elements', 'dl.ckeditor-tabber'),
),
), 'setting');
}
function ckeditor_tabber_menu() {
$items['admin/config/content/ckeditor_tabber'] = array(
'title' => 'Configure CKEditor Tabber',
'description' => 'Choose which elements to display as tabs.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'ckeditor_tabber_admin_form',
),
'access arguments' => array(
'administer site configuration',
),
'file' => 'ckeditor_tabber.admin.inc',
'type' => MENU_NORMAL_ITEM,
);
return $items;
}
function ckeditor_tabber_ckeditor_plugin() {
return array(
'tabber' => array(
'name' => 'tabber',
'desc' => t('Create tabs with CKeditor'),
'path' => drupal_get_path('module', 'ckeditor_tabber') . '/tabber/',
'buttons' => array(
'addTab' => array(
'icon' => 'icons/tabber.png',
'label' => t('Add tab'),
),
),
),
);
}
function ckeditor_tabber_wysiwyg_plugin($editor) {
if ($editor == 'ckeditor') {
$path = drupal_get_path('module', 'ckeditor_tabber') . '/tabber';
return array(
'tabber' => array(
'path' => $path,
'buttons' => array(
'addTab' => t('CKEditor Tabber'),
),
'load' => TRUE,
),
);
}
}