I've just downloaded the latest whizzywig (61) and when I select it from the input formats list it appears to load up, but it non-interactive. Clicking 'disable rich text' seems to do nothing, but if clicked again it loads another instance of the editor, which is also non-interactive. I haven't made any configuration changes to the editor via the WYSIWYG configuration panel other than assigning it to my input format.
I'm also using the Better Formats module to restrict the wysiwyg editor per content type, to avoid user confusion with 'input formats' selection. I don't think it is the issue, since when I disable any restrictions on my 'blog' content type, enabling the input formats selection fieldset, it still doesn't resolve the issue.
This is what Chrome dumps into the console.
Uncaught TypeError: Cannot read property 'document' of null/sites/all/libraries/whizzywig/whizzywig.js?Z:118
makeWhizzyWig/sites/all/libraries/whizzywig/whizzywig.js?Z:118
Drupal.wysiwyg.editor.attach.whizzywig/sites/all/modules/wysiwyg/editors/js/whizzywig-56.js?Z:74
Drupal.wysiwygAttach/sites/all/modules/wysiwyg/wysiwyg.js?Z:113
(anonymous function)/sites/all/modules/wysiwyg/wysiwyg.js?Z:53
each:1
D.fn.D.each:1
Drupal.behaviors.attachWysiwyg/sites/all/modules/wysiwyg/wysiwyg.js?Z:47
(anonymous function)/misc/drupal.js?Z:42
each:1
Drupal.attachBehaviors/misc/drupal.js?Z:41
(anonymous function)/misc/drupal.js?Z:277
(anonymous function):1
(anonymous function):1
each:1
ready| Comment | File | Size | Author |
|---|---|---|---|
| #1 | wysiwyg-whizzywig-v60-api.patch | 3.62 KB | twod |
Comments
Comment #1
twodAh, was looking for this issue but couldn't find it before.
I've got a patch to fix this error over in #922436: Wizzywig: Uncaught TypeError: Cannot read property 'document' of null in Chrome, it also happens with earlier versions of Whizzywig under Chrome. That patch is not enough to get v60 and above working perfectly though.
We've previously dealt with the version string not being recognized in v60+, see #753536: The version of Whizzywig could not be detected., but it turns out Whizzywig has changed a lot more than that.
To deal with large "API-related" changes in editors, we have a mechanism to load a different JavaScript integration file, which I'll call whizzywig-60.js.
The patch below accounts for these changes and should make attaching/detaching Whizzywig work better in all browsers.
I'm in a bit of a hurry right now so I probably missed something in the patch, but please test it. It also has everything from the #922436: Wizzywig: Uncaught TypeError: Cannot read property 'document' of null in Chrome patch so you only need to apply this one for Whizzywig v60+.
EDIT: Did indeed miss at least one thing, as this is a new file, the first line with the CVS tag must be reset.
But, I won't commit this before the other Whizzywig patches for < v60 are approved anyway. This patch must be updated to reflect any changes in the other patches to keep integration files in sync.
Comment #2
twodRead:
// $Id$No, it's not a coding style error, it's a feature... >_<;
Before patch: No go, things break in all browsers.
With patch: Yay in all browsers!
RTBMe!
Powered by Dreditor.
Comment #3
sunThanks 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.
Comment #5
solidlink commentedHow do I use/enable whizzywig for blog?
it doesnt activate when im using it for blog in drupal
Comment #6
twod@solidlink, that's another issue, please continue in #979196: Editor works on all content types except for blogs, however it works for the main admin?.