function wysiwyg_template_wysiwyg_plugin in Wysiwyg API template plugin 7.2
Implementation of hook_wysiwyg_plugin().
File
- ./
wysiwyg_template.module, line 169 - Makes TinyMCE Templates available as plugin for client-side editors integrated via Wysiwyg API.
Code
function wysiwyg_template_wysiwyg_plugin($editorName, $version) {
switch ($editorName) {
case 'tinymce':
return array(
'template' => array(
'buttons' => array(
'template' => t('Insert templates'),
),
'url' => 'http://drupal.org/project/wysiwyg_template',
'internal' => TRUE,
'options' => array(
'template_external_list_url' => _wysiwyg_template_get_list_url($editorName),
),
'extended_valid_elements' => array(
//tinymce specific - allows additional elements to be used
'img[id|class|src|border=0|alt|title|width|height|align|name|style]',
),
'load' => TRUE,
),
);
break;
case 'ckeditor':
return array(
'templates' => array(
'buttons' => array(
'Templates' => t('Insert templates'),
),
'url' => 'http://drupal.org/project/wysiwyg_template',
'internal' => TRUE,
'options' => array(
'templates_files' => array(
_wysiwyg_template_get_list_url($editorName),
),
//load the javascript template list
'templates_replaceContent' => false,
),
'load' => FALSE,
),
);
break;
case 'fckeditor':
return array(
'templates' => array(
'buttons' => array(
'Templates' => t('Insert templates'),
),
'url' => 'http://drupal.org/project/wysiwyg_template',
'internal' => TRUE,
'options' => array(
'TemplatesXmlPath' => array(
_wysiwyg_template_get_list_url($editorName),
),
),
'load' => FALSE,
),
);
break;
}
}