<?php
/**
* Customize a TinyMCE theme.
*
* @param init
* An array of settings TinyMCE should invoke a theme. You may override any
* of the TinyMCE settings. Details here:
*
* http://tinymce.moxiecode.com/wrapper.php?url=tinymce/docs/using.htm
*
* @param textarea_name
* The name of the textarea TinyMCE wants to enable.
*
* @param theme_name
* The default tinymce theme name to be enabled for this textarea. The
* sitewide default is 'simple', but the user may also override this.
*
* @param is_running
* A boolean flag that identifies id TinyMCE is currently running for this
* request life cycle. It can be ignored.
*/
function phptemplate_tinymce_theme($init, $textarea_name, $theme_name, $is_running) {
switch ($textarea_name) {
// Disable tinymce for these textareas
case 'log': // book and page log
case 'img_assist_pages':
case 'caption': // signature
case 'pages':
case 'access_pages': //TinyMCE profile settings.
case 'user_mail_welcome_body': // user config settings
case 'user_mail_approval_body': // user config settings
case 'user_mail_pass_body': // user config settings
case 'synonyms': // taxonomy terms
case 'description': // taxonomy terms
case 'hours': //dealer page opening hours
case 'message': //contact form message
case 'nodewords-description': // meta tags description
break;
}
// Add some extra features when using the advanced theme.
// If $init is available, we can extend it
/* This was quoted out as it caused a white screen login in and out
switch ($theme_name) {
case 'advanced':
$init['width'] = '100%'; //force editor content cell to full width!
break;
}
*/
if($theme_name=='advanced'){
$init['width'] = '100%'; //force editor content cell to full width!
}
}
// Always return $init
return $init;
}
?>