What does it do?
- This plugin makes it easy to install FCKEditors on your page the JQuery way.
- It integrates FCKEditors with the jQuery Form Plugin and enables the contents of FCKEditor to be submitted via ajax.
- Also works with the Validation Plugin
Try it yourself
Download
All you really need is FKCEditor (DUH!), jQuery (of course) and the jQuery FCKEditor Plugin.
But if you want to submit your form via Ajax, then you need to get the jQuery Form Plugin by Malsup.
Usage
- Method 1: replacing ALL textareas in a page with THE SAME settings
<textarea name="fck1" cols="50" rows="6"></textarea> <textarea name="fck2" cols="50" rows="6"></textarea> <textarea name="fck3" cols="50" rows="6"></textarea> <script> $(function(){ $('textarea').fck({path: '/path/to/fck/directory/'}); }); </script>
- Method 2: replacing SOME textareas in a page with THE SAME settings
In this example, only textarea fck3 will not be converted into a FCKEditor.
<textarea name="fck1" class="fck" cols="50" rows="6"></textarea> <textarea name="fck2" class="fck" cols="50" rows="6"></textarea> <textarea name="fck3" cols="50" rows="6"></textarea> <script> $(function(){ $('textarea.fck').fck({path: '/path/to/fck/directory/'}); }); </script>
- Method 3: replacing SOME textareas in a page with DIFFERENT SETTINGS (see demo)
<textarea name="fck1" cols="50" rows="6"></textarea> <textarea name="fck2" cols="50" rows="6"></textarea> <textarea name="fck3" cols="50" rows="6"></textarea> <script> $(function(){ $.fck.config = {path: '/path/to/fck/directory/', height:300 }; $('textarea#fck1').fck(/* default settings */); $('textarea#fck2').fck({ toolbar:'MyCustomerToolbar' }); $('textarea#fck3').fck({ toolbar:'MyCustomerToolbar', height:200 }); }); </script>
Important pointers…
-
This is a working idea that hasn't yet been fully tested.
Tested and works on Firefox 2, Opera, Safari (Win), IE7 and IE6 (all in WinXP SP2). - The same principle can be applied to TinyMCE, Codepress and any other rich-text editors.
Any input regarding other rich-text editors is welcome. - The plugin will intercept known methods and install itself against related plugins (currently only the jQuery Form Plugin).
Any input regarding integrating this plugin with other JQuery plugins is welcome.