CKEditor and Rails

4 Lines of Code

CKEditor, the successor of FCKeditor, is one of the most used WYSIWYG text editors, besides the WMD editor which is for instance used in an updated version at Stackoverflow. Integrating the CKEditor in Ruby on Rails is simple. It only requires a few lines of code. There are a number of Rails plugins, but you don’t really need them. Download the CKEditor Zip file, extract the files and place them in the sub directory “javascripts/ckeditor”, add the main JS file to the layout..

..and write a bit JavaScript code which replaces textareas by CKEditor instances:

That’s all! Quite simple, isn’t it?

View original post

Leave a comment