Activeadmin::Redactor

Limited subsection of redactor options. Currently no plans to make this feature complete (supporting all the options from the API). Feel free to add options and submit a pull request if missing one you require.

Usage

Add it to your Gemfile

gem 'activeadmin-redactor'

Configure your ActiveAdmin Resource

ActiveAdmin.register Page do
  redactorable # creates the controller action which handles the editor

  index do
    redactorable_edit_icon # inserts an edit icon / link
    # other columns...
  end
end

Optional View Port Customization

Stylesheets

Default setting is 'activeadmin-redactor'

  redactorable stylesheets: ["fonts", "application"]

Javascripts

Default setting is 'jquery', 'jquery_ujs', 'activeadmin-redactor'

  redactorable javascripts: ["textdirection.js"]

Layout

Default setting is 'redactor'

  redactorable layout: ["foobar"]

Tempate

Default setting is 'redactor/editor'

  redactorable template: ["redactor/editor"]

Optional Redactor Customization

focus

Default setting is false

  redactorable redactor: {focus: true}

iframe

Default setting is false

  redactorable redactor: {iframe: true}

fullpage

Default setting is false

  redactorable redactor: {fullpage: true}

css

Default setting is none

  redactorable redactor: {css: ['application', 'override']}

minHeight

Default setting is false

  redactorable redactor: {minheight: 200}

imageUpload

Default setting is false

  redactorable redactor: {imageupload: '/foo/bar/path'}

plugins

Default setting is none

  redactorable redactor: {plugins: ['admin/fontfamily.js']}

Contributing

  1. Fork it ( https://github.com/[my-github-username]/activeadmin-redactor/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request