Fork me on GitHub
Please upgrade to 2.1.x here. The 2.0 branch is no longer being updated.
You should grab 2.1.9, released 18 March. It's what all the cool kids are doing.

CLEditor: (yet) another wysiwyg plugin

edited August 2011 in Vanilla 2.0 Help
This discussion is related to the CLEditor jQuery WYSIWYG addon.
Progress with jwysiwyg has pretty much stalled without any resolution of the bugs others have highlighted.

Last week I came across a new jQuery wysiwyg plugin called CLEditor.

I've made a Vanilla plugin using it: CLEditor for Vanilla

It's functional with the 'stock' .js and .css, it also allows editing of the HTML - unlike jwysiwyg.

On Vanilla 2.0.3 you need to update the file applications/dashboard/modules/class.headmodule.php - insert this at line 269:
         foreach ($this->_Strings as $String) {
$Head .= $String;
$Head .= "\n";
One tweak you can make is to edit line-19 of jquery.cleditor.min.js to remove extra toolbar buttons, eg. cut/copy/paste might not work on your system.

BUGS: There's a bug where both the HTML and WYSIWYG view are visible in 'Write comment' textarea in a Discussion. This is 'fixed' by clicking the HTML button a couple of times. Try this fix:

Edit plugins/cleditor/default.php and change line-43 to:
$Sender->Head->AddString('$("#Form_Body").live("mouseover", function() {$("#Form_Body").cleditor({width:"100%", height:"100%"});});');
There's probably a way of fixing this with a jQuery call, one of these pages might help a jQuery-guru figure it out:

Try it out and let us know how it goes!


Sign In or Register to comment.