No commit activity in last 3 years
No release in over 3 years
A plugin that allows you to easily drop Ckeditor into ActiveAdmin.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 1.0.0.pre1
>= 4.1.2, ~> 4.1
>= 4.2.3, ~> 4.2
 Project Readme

ActiveAdmin CKEditor

Use CKEditor with ActiveAdmin textareas.

Tested with:

  • Rails 4.2
  • ActiveAdmin 1.0.0
  • Ckeditor 4.1.2

Usage

Add it to your Gemfile

gem 'activeadmin_ckeditor'
$> bundle install

Run the generator to setup assets

rails g active_admin_ckeditor:install

Now, you need to enable CKEditor on the fields in which you would like to use it.

ActiveAdmin.register Email do
  permit_params :subject, :format_html, :format_text

  form do |f|
    f.semantic_errors *f.object.errors.keys
    f.inputs do
      input :subject
      input :format_html, as: :ckeditor
      input :format_text
    end
    actions
  end
end

You can pass additional config options in on the field if needed

input :format_html, as: :ckeditor, input_html: { ckeditor: { height: 400 } }

Configuring CKEditor

Copy the default config provided by the CKEditor gem into your local project.

From the root of your rails project:

cp $(bundle show ckeditor)/app/assets/javascripts/ckeditor/config.js ./app/assets/javascripts/ckeditor/config.js

Now you can customize config.js to suite your needs.