This may be a duplicate of the *forum* thread here but I'm unsure: http://drupal.org/node/111912

After upgrading to Drupal 5.5, the disable / enable rich-text link no longer works with the TinyMCE editor. The link is there but does not do anything. Users need to manually choose their default setting by changing TinyMCE prefs in their profile. So the editor works fine, just the toggle link.

Clicking the link will generate this error in Firefox Error Console:

Error: tinyMCE.getEditorId is not a function
Source File: http://mysite.com/node/add/blog
Line: 42

Note this didn't happen on our Drupal 5.3 sites, but once we went to 5.5 it did start to occur.

Comments

dawansv’s picture

I had the exact same issue with TinyMCE 3.0 -- reverted back to version 2 and no longer having the problem. It must be caused by changes in version 3.0 javascript code whereas functions available in version 2 (and used by the drupal module) have been changed/renamed/removed...

wdtj’s picture

I also am having this problem. Looks like the current TinyMCE module and TinyMCE 3 are broke.

hansfn’s picture

Priority: Normal » Critical
Status: Active » Reviewed & tested by the community
StatusFileSize
new1.27 KB

It seems that the TinyMCE developers have changed the API. I have created a patch that makes this module work with the current TinyMCE (3.0) - see attached file.

Added: After looking at the TinyMCE migration guide, I have updated the patch - replacing tinyMCE.getInstanceById with tinyMCE.get. (The old version of the patch works.)

kle’s picture

StatusFileSize
new12.03 KB

And here is the patched file for "TinyMCE 5.x-1.9"

Just replace it with the older file in >modules>tinymce>tinymce.module

bazaarsoft’s picture

HMMMMM...

Nope. Now the error is:

Error: tinyMCE.get is not a function
Source File: http://mydomain.com/drupal/?q=node/6/edit

I have the release version of tinymce 3.0 and the patched module from above.

Any other ideas? This is a show-stopper since you can't add the < !--break--> in a story to separate the tickler from the rest of the body...

UPDATE: the error above is still happening in FireFox 2. In Safari, it worked for a while, but the editor was way too wide. After messing around with various solutions to THAT problem, it stopped working prompty as I got the width thing fixed. I have to say, I'm VERY disgusted with drupal at the moment. I'm going through all this crap just because the standard "Story" doesn't allow inline images. It's AMAZING that a CMS that's been around this long has such a fundamental flaw.

fuquam’s picture

The editor just doesn't show up for me. I have all the permissions set right. I installed the patch. I know TinyMCE works because I have it on three other Drupal sites I've built and it works fine. I'm using a different theme on this site plus using Drupal 5.7. Could there be something with the theme or Drupal version thats not allowing the editor to show up? I wish I'd at least get an error so I knew where to start?

steinmb’s picture

StatusFileSize
new54.3 KB

Drupal 5.7
TinyMCE module 5.x-1.9
TinyMCE 3.0
Firefox 2.0.0.12 Mac OS 10.5.1

Added the patch and the turn on/off editor button is working again. On the "Edit tinymce profile" all the Buttons is gone, in my old sites are they showing, just plain text and checkboxes, is this as designed?

--
Stein Magne

thepaul’s picture

Thanks a million hansfn!

Bodo Maass’s picture

The patch from #3 does make TinyMCE 3.0.2.1 work with the TinyMCE.module 5.x-1.9, but only without the compressor. If I try to install the TinyMCE Compressor 2_0 I get the javascript error "o is not a constructor". So something else seems to be missing.

Also, the latest version of MCImagemanager is also not supported at all yet. So for now it seems easier to stay with TinyMCE 2.1.3 + compressor 1.1.0 + MCImageManager 2.0.

dr00b’s picture

Tried every version/method above, all throw at least one error even if the editor loads. Does anyone have a step by step to get *any* version of tinymce working with 5.7?

Bodo Maass’s picture

dr00b, TinyMCE 2.x should work out of the box with the TinyMCE.module 5.x-1.9. If it doesn't maybe you should try it on a clean test site first to see that it works on your system.
To get TinyMCE 3.x working with Drupal 5.7, check my comment #9 in this thread: http://drupal.org/node/182319
3.x works, but only without the PHP compressor.

scor’s picture

I can confirm the issue and the patch #3 fixes it. It'd be nice to commit this patch so that the version 3 stable of tinymce can be used on Drupal.

steinmb’s picture

Hi
Does anyone have a comment to my Q in #7?

--
Stein Magne

scor’s picture

I noticed it too after installing tinyMCE 3.0.6 but didn't have time to look into it.

murz’s picture

Thanks for patch "tinymce.module.patch - version 2"!
Works good on Drupal 6.2 & Tinymce 3.0.8!

bilevader’s picture

solution at post #4 worked like charm for me. thanks!

ennetws’s picture

Thanks ! patch works perfectly.

artsakh8’s picture

Sorry, guys, but how should I use the 'tinymce.module.patch - version 2' ?
How can I patch it?
Using Drupal 6.2 and TinyMCE 3.0.9 with compressor, with the same problem as most of people here.

Thanks

AdrianB’s picture

I hade the same problem (using TinyMCE 3.0.9 and Drupal 5.7).

The patched tinymce.module in #4 worked for me as well. Maybe this worth committing?

steveoliver’s picture

Thanks. This patch works great.

mardok’s picture

Thanks for solution #4

RobertNelsonVance’s picture

Patched Module file in #4 seems to be working fine.... definitely resolves the toggle issue.... haven't noticed any side effects yet.

sun’s picture

FYI: Wysiwyg API supports TinyMCE 3.x now.

Squirrelly’s picture

Using the patched module from #4 and working for me as well.

coderintherye’s picture

Patch in #4 did not work for me, as it returned to the problem described here: http://drupal.org/node/235972 where all that appears is a blank screen with two lines for disable rich text editor. The fix described in the linked thread fixed that problem, but then after copying the file in #4 the problem in the linked thread returns. I will now try patch in #3 to see if that works.

sun’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

Please look at the project page to learn how to solve this issue.

coderintherye’s picture

Component: User interface » Documentation
Status: Closed (won't fix) » Postponed (maintainer needs more info)

Changing this to a documentation issue. Sun, I respect the work that looks like has gone into this, but can we do a better job of describing what is going on and steps to installing a working editor. When reading the first paragraph on the project page, I see ...WYSIWYG API... and seeing API kind of makes my eyes gloss over when looking from an end-user perspective. It would seem that everything is in a big transitional state, but it's hard to make sense of what we are supposed to be doing just from looking at those paragraphs on the project page.

sun’s picture

Hm. Well, I do not have permissions to alter TinyMCE's project page (actually, I have, but I'm basically not allowed to) - if you meant TinyMCE's project page at all?

After all, the Wysiwyg project is an API, if you happen to install it, you can use a bunch of editors with it. I can see your point though... The difference from other modules like Views, which primarily is also an API, is that Wysiwyg does nothing on its own. So you need to download one of the supported editors (according to the on-screen installation instructions) to use it.

steinmb’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Closing due to inactivity.