Skip to content
Rich text editor for Active Admin using wysihtml5.
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
app
db/migrate
lib
test
vendor/assets/javascripts/active_admin/editor
.gitignore
Gemfile
Gemfile.lock
MIT-LICENSE
README.md
Rakefile
active_admin_editor.gemspec

README.md

Active Admin Editor

This is a wysiyg html editor for the Active Admin interface using wysihtml5.

screenshot

Installation

# Gemfile

gem 'active_admin_editor'

Then add the following stylesheet to your application manifest:

# app/assets/stylesheets/application.css
//= require active_admin/editor/wysiwyg

And the following to your active_admin.css.scss and active_admin.js:

# app/assets/javascripts/active_admin.js
//= require active_admin/editor
# app/assets/javascripts/active_admin.css.scss
@import 'active_admin/editor';

And finally install the wysiwyg css file:

$ rails g active_admin:editor

Usage

This gem provides you with a custom formtastic input called :html_editor to build out an html editor. All you have to do is specify the :as option for your inputs.

Example

ActiveAdmin.register Page do
  form do |f|
    f.inputs do
      f.input :title
      f.input :content, as: :html_editor
    end

    f.buttons
  end
end
Something went wrong with that request. Please try again.