Sunday, June 22, 2008

WYSIWYG-editor on Rails

I found the following post very helping http://public.ok2life.com/welcome/index/48 and http://public.ok2life.com/welcome/index/49.html and http://www.fckeditor.net/demo. We are using FCKEditor and so far it is going very smoothly. In order to add a custom toolbar option, you need to write a plugin to fckeditor. In order to make spell checker to work, you need to install aspell http://wiki.lyx.org/Mac/MacSpelling and include file ActionView::Helpers::SanitizeHelper. I added the following line application's initializers dir
include ActionView::Helpers::SanitizeHelper
This was needed in Fckeditor: Version 0.4.3.

To write a plug-in to fckeditor, follow direction on http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Customization/Plug-ins. After reading documentation from this link, I used the following plugin as an example (note: fckeditor comes with this plug-in): /fckeditor/public/javascripts/fckeditor/editor/plugins/placeholder/

No comments: