ckeditor_abbreviation.module in CKEditor Abbreviation 7
Same filename and directory in other branches
CKEditor abbreviation button.
File
ckeditor_abbreviation.moduleView source
<?php
/**
* @file
* CKEditor abbreviation button.
*/
/**
* Implements hook_help().
*/
function ckeditor_abbreviation_help($path, $arg) {
switch ($path) {
case 'admin/help#ckeditor_abbreviation':
$output = '';
$output .= '<h3>' . t('CKEditor Abbreviation Button') . '</h3>';
$output .= '<p>' . t('The module adds a CKEditor (WYSIWYG HTML editor) abbreviation button to the editor toolbar and a link to its context menu (only available if you select an existing abbr tag in the editor content).') . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
$output .= '<dt>' . t('Settings') . '</dt>';
$output .= '<dd>' . t('In the <a href="@ckeditor-settings">ckeditor profiles</a> under <em>Editor appearance</em> move the icon into the toolbar and check the plugin in the <em>Plugins</em> section.', array(
'@ckeditor-settings' => url('admin/config/content/ckeditor'),
)) . '</dd>';
$output .= '<dd>' . t('If your <a href="@text-formats">text formats</a> that use ckeditor limit the allowed HTML tags, add "<abbr>" to the allowed tags.', array(
'@text-formats' => url('admin/config/content/formats'),
)) . '</dd>';
$output .= '</dl>';
return $output;
}
}
/**
* Implements hook_ckeditor_plugin().
*/
function ckeditor_abbreviation_ckeditor_plugin() {
$module_path = drupal_get_path('module', 'ckeditor_abbreviation');
$plugins = array();
$plugins['abbr'] = array(
'name' => 'abbr',
// as in plugin.js CKEDITOR.plugins.add('NAME')
'desc' => t('Plugin to insert and edit abbreviations'),
'path' => $module_path . '/plugins/abbr/',
'buttons' => array(
'abbr' => array(
// as in plugin.js ui.addButton('BUTTON-NAME')
'icon' => 'icons/abbr.png',
'label' => 'Insert Abbreviation',
),
),
);
return $plugins;
}
Functions
Name | Description |
---|---|
ckeditor_abbreviation_ckeditor_plugin | Implements hook_ckeditor_plugin(). |
ckeditor_abbreviation_help | Implements hook_help(). |