The "Show enable/disable rich text toggle link" checkbox in the Wysiwyg profile configuration settings does not prevent the "Disable rich-text" link from appearing below a WYSIWYG-enabled textarea.

I'm using Drupal 6.6 with wysiwyg-6.x-0.4 and TinyMCE 3.2.1.1.

Looking at wysiwyg.js, it appears that it unconditionally adds the enable/disable link without checking the showToggle value. I've attached a patch that fixes the problem.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

markus_petrux’s picture

I think this is working in latest dev snapshot. A new 0.5 release is pending on this one: #322657: "Enabled by default" option does not work when disabled

sun’s picture

Good catch. However, configuring this per wysiwyg profile no longer works out. Seems like we need global wysiwyg settings now?

sun’s picture

Version: 6.x-0.4 » 6.x-0.5
Status: Needs review » Active

Proper version and status (active, because the existing patch is not a solution; see #2).

weimeng’s picture

Just pointing out that this issue still exists in the 16 Dec 2008 5.x-1.x-dev build.

blinko’s picture

Version: 6.x-0.5 » 6.x-1.x-dev

Same here! The option does not disable the button...

(Drupal 6.8 + latest dev version + TinyMCE latest)

Mark Theunissen’s picture

subscribing

chaloalvarezj’s picture

subscribing..

jarchowk’s picture

Any word with this?

Subscribing

Freso’s picture

Just wanted to note that this is also present in the 6.x-1.0 release.

Soukee’s picture

Same problem here. Need to insert teaser break and exclude the teaser from the body of node. Any solution pls?

Shai’s picture

Same problem... subscribing.

kishorevaishnav’s picture

FileSize
860 bytes

The patch updated above points to line no. 49 but when i worked out it seems to be at the line 79. I think this patch will work better. Let me know if it doesnt works out.

sun’s picture

It does not work out. See #2.

thinguy’s picture

Same problem. Any fix?

rconstantine’s picture

Status: Active » Needs review

The patch in #12 seems to work for me using FCKEditor and 6.x-2.x-dev version. Of course, I had to manually apply the patch since the line numbers no longer match. I was able to toggle the checkbox and see the desired results both times.

pingu2k4’s picture

subscribing...

REALLY need this fixed ASAP please

sun’s picture

Oh? You need this fixed ASAP? So why didn't you provide a patch others can test?

sinasquax’s picture

For me this patch works :

replace :

Drupal.wysiwygAttachToggleLink(context, params);

by :

// Get format id
var format = parseInt(params.format.substr(6)) - 1;

// Attach or update toggle link.
if (Drupal.settings.wysiwyg.showToggle[format]) {
  Drupal.wysiwygAttachToggleLink(context, params);
}
iamwhoiam’s picture

that did the trick to remove the menu if tick box is unticked. But when you retick the checkbox, the link doesn't return.

simanta’s picture

I have used wysiwyg v6.x-1.1 in my project and got the same problem. But I get rid of that bug using the following patch:

replace :

Drupal.wysiwygAttachToggleLink(context, params); //Line 82 at the above mentioned version

by :

// Attach or update toggle link. if (Drupal.settings.wysiwyg.showToggle) { Drupal.wysiwygAttachToggleLink(context, params); }
ailgm’s picture

subscribing

danielb’s picture

comment deleted

torrance123’s picture

Subscribing.

dhestlund’s picture

Subscribing... sry for other users' impatience. Great module guys!

Simanta's code worked like a charm for me, toggling both ways. Hoping this gets incorporated by next release (I'm forgetful).

myDRU’s picture

Patch proposed in #20 above works fine (I justed installed wysiwyg 6.x-2.0-alpha1 and tinymce 3.2.4.1, where the patch is still needed).

Hope this small patch will become part of the wysiwyg 6.x-2.0-alpha2.

sun’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
FileSize
7.98 KB

Meh. It would be nice if people would listen to what I say.

Attached patch needs testing.

sun’s picture

Status: Needs review » Fixed

I guess that most of you don't know how to apply this patch. So.

Thanks for reporting, reviewing, and testing! Committed to all branches.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

joachim’s picture

Status: Closed (fixed) » Active

I've just installed the latest dev version and the toggle doesn't appear.

> grep showToggle *
produces only one result -- can't be right, surely?

sun’s picture

Status: Active » Closed (fixed)
sun’s picture

As well as #545210: Default module behavior should match profile settings default (much more likely the issue you encountered)

joachim’s picture

Does this mean it's still possible to toggle off the wysiwyg?
Being able to switch to SANE mode on a site where the client insists on a wysiwyg is really necessary!

sun’s picture

Version: 6.x-2.x-dev » 6.x-2.0

Yes, that should work now. At least, this patch was committed to fix the bug in 2.0 where it did not account for the profile configuration setting at all.