wymeditor/wymeditor — Issue #308: Drupal integration
Author: Sweetchuck
Created: 2011-11-19 00:59:43+00:00
State: open

I had try to integrate WYMeditor into a Drupal 7 based website.
The wysiwyg module only works with WYMeditor v0.5
But I would like to use the latest version of WYMeditor.

I wrote a very-very simple drupal module with the following JS code

```javascript
(function ($) {

Drupal.behaviors.mymodule = {
attach: function(context) {
$('.wymeditor:not(mymodule-processed)', context)
.addClass('mymodule-processed')
.wymeditor()
;
}
}

})(jQuery);
```
I had got some erros in the browser console:
"$ is not a function"
Then I replace (almost each)
$.
to
jQuery.

and
$(
to
jQuery(

in wymeditor/jquery.wymeditor.js then the WYMeditor works fine :-)

Is this a bug in wymeditor, or do I something with wrong?