summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--INSTALL.txt38
-rw-r--r--tinymce.module8
2 files changed, 25 insertions, 21 deletions
diff --git a/INSTALL.txt b/INSTALL.txt
index 32d31cc..85d7318 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -123,12 +123,18 @@ Put the following function in your themes template.php file:
* 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) {
+function theme_tinymce_theme($init, $textarea_name, $theme_name, $is_running) {
switch ($textarea_name) {
// Disable tinymce for these textareas
- case 'log':
+ case 'log': // Book log
+ case 'message': // Page log
case 'img_assist_pages':
- case 'caption':
+ case 'caption': // signature
+ case 'pages':
+ case 'access_pages': //TinyMCE profile settings.
+ case 'user_mail_welcome_body':
+ case 'user_mail_approval_body':
+ case 'user_mail_pass_body':
unset($init);
break;
@@ -136,28 +142,18 @@ function phptemplate_tinymce_theme($init, $textarea_name, $theme_name, $is_runni
case 'signature':
case 'site_mission':
case 'site_footer':
- case 'settings][access_pages':
+ case 'access_pages':
+ case 'site_offline_message':
+ case 'page_help':
+ case 'user_registration_help':
+ case 'user_picture_guidelines':
$init['theme'] = 'simple';
- unset($init['theme_advanced_toolbar_location']);
- unset($init['theme_advanced_toolbar_align']);
- unset($init['theme_advanced_path_location']);
- unset($init['theme_advanced_blockformats']);
- unset($init['theme_advanced_styles']);
+ foreach ($init as $k => $v) {
+ if (strstr($k, 'theme_advanced_')) unset($init[$k]);
+ }
break;
}
- // Add some extra features when using the advanced theme.
- switch ($theme_name) {
- case 'advanced':
- $init['extended_valid_elements'] = array('a[href|target|name|title|onclick]');
- $init['theme_advanced_buttons3_add_before'] = array('tablecontrols');
- break;
- }
-
- // Always return $init; !!
- return $init;
-}
-
If you study the above function you can see that tinymce can be completely
disabled or you can even switch themes for a given textarea.
diff --git a/tinymce.module b/tinymce.module
index c3533f9..4c2c4f2 100644
--- a/tinymce.module
+++ b/tinymce.module
@@ -283,10 +283,14 @@ function theme_tinymce_theme($init, $textarea_name, $theme_name, $is_running) {
switch ($textarea_name) {
// Disable tinymce for these textareas
case 'log': // Book log
+ case 'message': // Page log
case 'img_assist_pages':
case 'caption': // signature
case 'pages':
case 'access_pages': //TinyMCE profile settings.
+ case 'user_mail_welcome_body':
+ case 'user_mail_approval_body':
+ case 'user_mail_pass_body':
unset($init);
break;
@@ -295,6 +299,10 @@ function theme_tinymce_theme($init, $textarea_name, $theme_name, $is_running) {
case 'site_mission':
case 'site_footer':
case 'access_pages':
+ case 'site_offline_message':
+ case 'page_help':
+ case 'user_registration_help':
+ case 'user_picture_guidelines':
$init['theme'] = 'simple';
foreach ($init as $k => $v) {
if (strstr($k, 'theme_advanced_')) unset($init[$k]);