Not all of the textarea fields correspond to HTML data, so in an attempt to narrow down the textareas that FCKeditor swaps out, I've added a feature to only swap out textareas named 'body' rather than all of them.
It adds a setting for "Only affect 'body' areas". If this is true, then only textareas named 'body' will be swapped.
This method is not fool proof, for instance on the edit block page (admin/block/configure/block/1), the area for editing block content is called 'body' and with the FCKeditor enabled, any PHP in the textarea will get wiped out.
So I'm open to suggestions if anyone has 'em.
This is my first patch for a Drupal module, so please let me know if I've done anything incorrectly.
Hope my patch is helpful!
-Jeff
| Comment | File | Size | Author |
|---|---|---|---|
| fckbodyonly.patch | 1.56 KB | jjeff |
Comments
Comment #1
slower commentedThis patch fails using the 4.5 version of fckeditor.module.
Comment #2
jjeff commentedActually, I made the patch on the CVS version.
Don't know what the differences are between CVS and 4.5.
I could have messed up the diff, but I followed the instructions here.
-Jeff
Comment #3
slower commentedJust installed the CVS version of fckeditor.module and the patch still fails.
Comment #4
tulula commentedI needed a patch like this for my BLOCKS only, now it's affected all Body areas for all content.
Any other go around for my php filled blocks? I need this for my add/edit content areas still.
Lisa
Comment #5
jjeff commentedI think I've abandoned attempting to guess the names of textareas. Instead I've written another patch that adds a JavaScript "WYSIWYG" link below each textarea. Click it and the textarea gets replaced with the FCKeditor. Easy. And a lot more flexible.
-Jeff
Comment #6
ontwerpwerk commentedwe took another approach