No "disable rich text" in TinyMCE (patch)

biggena - July 20, 2008 - 12:23
Project:TinyMCE
Version:6.x-1.1-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:reviewed & tested by the community
Description

The latest version of TinyMCE module doesn't show a toggle for disabling or enabling of rich text editor.
Even if you set true for "Show disable/enable rich text editor toggele" in a profile.

Below patch fixes that problem.

I have included also the patched file tinymce.module.

It was tested on:

  • Drupal 6.x
  • TinyMCE module 6x-1.1-dev
  • TinyMCE 3.0.9 (release date 2008-06-02)
AttachmentSize
ToggleTinyMCE.patch3.14 KB
TinymceModuleFile.zip7.98 KB

#1

biggena - July 20, 2008 - 12:37

Just after I posted this patch, I found that another developer has fixed the same problem:
http://drupal.org/node/244066

#2

attheshow - September 15, 2008 - 17:20

Thanks bigenna! This patch worked for me on Drupal 6.4, TinyMCE 3.

Thanks very much also for including the module zip file. That was excellent!

#3

subhacom - September 17, 2008 - 11:43

Thanks, it works. But when I choose preview in blog, two entries for the toggle appear.

#4

Babalu - September 19, 2008 - 08:38

Thx

#5

littleneo - September 22, 2008 - 10:38

great ! thanks !
work with the last TinyMCE Version 3.2.0.1 (2008-09-17)

#6

pauldawg - September 29, 2008 - 05:39

Sorry I am new to the patching, wondering if someone could point me to a good way to apply a patch from this format? Thanks for the help!

#7

trailbosswillie - October 1, 2008 - 19:05

hey pauldawg - I'm a drupal newbie and haven't patched before either. I got it to work by taking the .zip file, extracting it, and uploading it to replace the original file in sites/all/modules/tinymce. Hope this helps!

I'm running Drupal 6.4, TinyMCE Version 3.2.0.1

#8

thereloaded - October 3, 2008 - 19:40

does this really work? ok, the toggle shows up, but when i set the "Default state" of "TinyMCE rich-text settings" to "disabled" and then enable the tinymce on demand, it only shows 6 Buttons at the bottom (Bold, Italic, Undo, Redo etc.), though i have way more buttons and i set it to appear on top.

and for some reason, i now even cant reproduce this, because the "Default state"-Setting is ignored (but thats maybe another problem).

edit:
after reading the other thread, i found this comment: http://drupal.org/node/244066#comment-828771 ("under the tinymce_config() function; and it says: $status = 'true';. So go ahead and remove that single line,"). This seems to help.

#9

h4cker - October 28, 2008 - 12:42

The patched file works fine for me.

#10

rohnjeynolds - November 6, 2008 - 17:53

I also experience the doubled toggle link, AND neither link works in preview. The text "disable" changes to "enable" in the link, but the editor itself does not toggle. Again, this is only in node preview -- everything works as desired on the main edit screen.

#11

frankcarey - November 7, 2008 - 20:43

Patch worked for me, should be followed up with the related patch that removes "$status = true" to get the correct functionality.

#12

conza - November 12, 2008 - 15:22

confirming solution (download .zip file, upload tinymce.module and replace existing on server) for:

Drupal 6.6
TinyMCE 6.x-1.1-dev
TinyMCE 3.2.0

thanks for the help! :)

#13

O_o - December 2, 2008 - 09:52

I had similiar problems but with TinyMCE 5.x-1.9. This patch "almost" solves the problem for me. If you are using TinyMCE 5.x-1.9 with TinyMCE 3.2.x, then apply this patch and comment out the following lines found at the bottom of function tinymce_process_textarea($element):

   //settings are saved as strings, not booleans
    if ($profile->settings['show_toggle'] == 'true') {
      // Make sure to append to #suffix so it isn't completely overwritten
      $element['#suffix'] .= $wysiwyg_link;
    }

#14

cgjohnson - December 5, 2008 - 17:01

This worked for me in D6.6 - using patch and removing the $status line.
THANK YOU!

#15

DanilaD - December 16, 2008 - 10:37

This helped me in D6.8 - patch and remove the $status line.
Thanks!

#16

pardavila - December 22, 2008 - 16:04

Second confirmation in 6.8!

Applied patch

Removed:
479: // $status = 'true';

as all state above!

Thanx 4 help!

#17

bigtrac - January 12, 2009 - 14:42

Tried this for 6.8 , and tinyMCE 3.2.1.1 (as well as a few other combinations.) Didn't work. Buttons appeared but did nothing.

#18

rjhodson - January 22, 2009 - 19:01

i had some limited success with this patch

it does now show up and actually toggle the TinyMCE editor, but there are a few quirks about it that have cropped up on various sites.

  • Sometimes it'll use the wrong verb - "enable" when the editor is already showing and "disable" when it's not
  • If you preview, it'll append another toggle link, so there will now be two of them.

The only thing I can think of that might be interfering with it is the IMCE template.php change that's required to get the button showing.

Thoughts?

#19

pauldawg - February 7, 2009 - 15:31

I am not having any luck with this at all. I have uploaded the module and removed the extra $status line (line 495, not 479), cleared the cache, enabled the "Show toggle"... and... nothing! Nothing at all! People here have talked about "limited success" or "almost fixed" but am not seeing any buttons at all. I'm probably missing something simple, but I am thoroughly confused. What should I be looking for and how do I get it?

 
 

Drupal is a registered trademark of Dries Buytaert.