Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
CLEditor: (yet) another wysiwyg plugin
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:
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:
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!
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) {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.
$Head .= $String;
$Head .= "\n";
}
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!
4
Comments
foreach ($this->_Strings as $String) { $Head .= $String; $Head .= "\n"; }
Save the file and reload to see if you can see the CLEditor toolbarThis fix is mentioned here: http://github.com/ShadauxCat/Garden/commit/4ade3f7d65811bc5d7fa013720fb70ee3a21fdc8 & here: http://vanillaforums.org/discussion/12509/vanilla-2.0.3-released
How do I stop both HTML & Wysiwyg displaying as a default? Looked in the forums attached but no luck.
So far, I'm 0 for 3 on getting any of these Wysiwyg plugins to work without major quirks.
Are you seeing it on 'Start a New Discussion' textareas also?
CLEditor is the closest to a 100% solution for WYSIWYG on Vanilla I've seen - if we can figure out this little quirk!
The previous attempt, jwysiwyg, stalled trying to figure out its quirks.
I've posted a question on the CLEditor Google group, so we hope to have a fix soon - CLEditor's author is on vacation until Aug 30.
On a side note, any plans to make this addon also work when you edit a post? So far, that seems to be a weakness of all of the wysiwyg plugins.
If anyone has any insight into calling jQuery (or having CLEditor 'listen' for new textareas) when the author clicks 'Edit', please comment here.
Edit plugins/cleditor/default.php and change line-43 to:
$Sender->Head->AddString('<script type="text/javascript">$("#Form_Body").live("mouseover", function() {$("#Form_Body").cleditor({width:"100%", height:"100%"});});</script>');
(*updated*)A step towards a full solution. Please let us know if this works for you.
Changed script and works great in both comment and new discussion, if it could work on the edit pages too that would be great but this is the first WYSIWYG editor that I have successfully installed and is working well. 1 out of 3
Could anyone help me put an 'add image' button / browse/ upload it to the site, with up to 9 images displaying under the discussion or comment similar to the images in the vanilla plugins?
That did it! Thanks a ton.