Skip to content

higorae/activeadmin-wysihtml5

 
 

Repository files navigation

Active Admin WysiHTML5

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

Installation

# Gemfile

gem 'activeadmin-wysihtml5'

Now install the migrations:

$ rake active_admin_editor:install:migrations
$ rake db:migrate

Usage

This gem provides you with a custom formtastic input called :wysihtml5 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: :wysihtml5, input_html: { commands: [ :link ], blocks: [ :h3, :p] }
    end

    f.buttons
  end
end

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 42.2%
  • CSS 40.8%
  • CoffeeScript 17.0%