easychart_wysiwyg.inc in Easychart 7.3
Provides the Easychart Wysiwyg plugin.
File
modules/easychart_wysiwyg/plugins/easychart_wysiwyg.incView source
<?php
/**
* @file
* Provides the Easychart Wysiwyg plugin.
*/
/**
* Provides easychart plugin to WYSIWYG API through the
* hook_wysiwyg_include_directory hook.
*/
function easychart_wysiwyg_easychart_wysiwyg_plugin() {
// add necessary jQuery ui libs
drupal_add_library('system', 'ui');
drupal_add_library('system', 'ui.dialog');
// Make path to module available to plugin.js
drupal_add_js(array(
'easychart' => array(
'module_path' => drupal_get_path('module', 'easychart_wysiwyg'),
),
), 'setting');
// Make all view modes available to plugin.js
$entity_info = entity_get_info('node');
$view_modes = array_keys($entity_info['view modes']);
drupal_add_js(array(
'easychart' => array(
'view_modes' => $view_modes,
),
), 'setting');
return array(
'easychart' => array(
'title' => t('Easychart'),
'vendor url' => 'http://drupal.org/project/easychart',
'icon path' => drupal_get_path('module', 'easychart_wysiwyg') . '/plugins/images',
'icon file' => 'icon.png',
'icon title' => t('Add a chart'),
'js path' => drupal_get_path('module', 'easychart_wysiwyg') . '/plugins/js',
'js file' => 'plugin.js',
'css path' => drupal_get_path('module', 'easychart_wysiwyg') . '/plugins/css',
'css file' => 'plugin.css',
'settings' => array(),
),
);
}
Functions
Name | Description |
---|---|
easychart_wysiwyg_easychart_wysiwyg_plugin | Provides easychart plugin to WYSIWYG API through the hook_wysiwyg_include_directory hook. |