Fork me on GitHub
Current releases are 2.1.5 (31 Oct 2014) and 2.0.18.13 (5 Aug 2014)

Ready for 2.1? Find out if your plugins are compatible. 2.0 will no longer be updated after Dec 2014.

CLEditor: (yet) another wysiwyg plugin

rakrak
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:
http://premiumsoftware.net/cleditor/docs/GettingStarted.html#internalObject
http://groups.google.com/group/cleditor/browse_thread/thread/d0f916101fe16903/

Try it out and let us know how it goes!
«13

Comments

«13
Sign In or Register to comment.