forked from activeadmin/activeadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
Ckeditor integration
houen edited this page Jan 26, 2012
·
3 revisions
To use CKEDitor in Active Admin, you need to do four things:
- Add Ckeditor to your Gemfile
gem 'ckeditor'
- Add the ckeditor stylesheet to active admin (in config/initializers/active_admin.rb)
config.register_javascript 'ckeditor/ckeditor.js'
- Change your form to a partial
ActiveAdmin.register User do
form :partial => "user_form"
- Add the ckeditor class to your input field in the partial (in _user_form.html.haml) (HAML style code)
= semantic_form_for [:admin, @user] do |f|
= f.input :description, :input_html => {:class => :ckeditor}
Presto! You're done :-)