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 Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s