Hi,
As maintainer of the Whizzywig module (http://drupal.org/project/whizzywig), i'm trying to integrate the editor with this API module instead of having a dedicated module.
However, this editor uses an unfortunate way to attach itself to the textarea: the JS function needs to be called in the HTML code after the element itself, instead of in the HTML head, which would be easier...
(specific info can be found here : http://www.unverse.net/using-whizzywig-web-pages.html)
I created the whizzywig.inc file, and the editors/js/whizzywig.js, but since this last file is called in the HTML head, the editor is shown on top of the page, breaking everything :)
Would there be an easy way to call the makeWhizzywig() function call after the rendering of the HTML element?
In the drupal 5 version i used the element #suffix attribute to add the JS code. Perhaps there's a better way...
I don't know if there's any way to achieve this with the WYSIWYG module... Any thoughts on that?
Sven
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | wysiwyg-HEAD.whizzywig.patch | 9.12 KB | sun |
| #8 | wysiwyg-DRUPAL-5.whizzywig.patch | 7.77 KB | sun |
| #6 | wysiwyg-DRUPAL-5.whizzywig.patch | 5.36 KB | sun |
| #5 | whizzywig.zip | 2.82 KB | sdecabooter |
Comments
Comment #1
sdecabooter commentedComment #2
sunSure. Just use nicedit.js or jwysiwyg.js as template (both in CVS HEAD). Note that usage of attach and detach functions is required, or Wysiwyg API won't be able to load a different editor when the input format is changed. If Whizzywig does not provide a clean way to detach the editor, you most probably have to implement similar (ugly) code like in the detach functions of fckeditor.js, jwysiwyg.js, or nicedit.js.
If you are stuck, just attach what you have so far and I'll see what I can do to help you out.
Comment #3
sunBetter title.
Comment #4
sunAny updates? If you'll attach what you have so far (state doesn't matter), then we can get the ball rolling.
Comment #5
sdecabooter commentedHi,
Attached are the editors/whizzywig.inc file and the editors/js/whizzywig.js file.
That last one is causing the problems with the integration currently...
The .inc file doesn't yet uses the options to select which buttons to show, etc...
Kind regards,
Sven
Comment #6
sunomg. That's probably the most nasty JavaScript editor I've ever seen. I mean, its behavior is nice, but the code is totally evil.
Anyway, attached patch attaches and detaches the editor fine on FF3/Windows.
Please note that the Drupal version does not matter. Attached patch is for 5.x, but will work on 6.x, too.
Comment #7
sunComment #8
sunNow with full buttons support.
Comment #9
sunCommitted attached patch to all branches.
Now go and mark that Whizzywig project on drupal.org as deprecated, please :)