Repository is archived
No commit activity in last 3 years
No release in over 3 years
Rails Admin Redactor
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

RailsAdminRedactor

RailsAdminRedactor is a plugin that adds the Redactor wysiwyg editor to RailsAdmin.

Getting Started

  1. Add gem "rails_admin_redactor" to your Gemfile
  2. Run bundle install
  3. Add the redactor.css and redactor.js files to your project (get them here)

Usage

RailsAdmin.config do |config|
  config.model 'Blog' do
    edit do
      field :content, :redactor do
        # Optional
        # The location of the redactor.js file. The default is...
        js_location { ActionController::Base.helpers.asset_path('redactor.js') }
        
        # Optional
        # The location of the redactor.css file. The default is...
        css_location { ActionController::Base.helpers.asset_path('redactor.css') }
        
        # Optional
        # The options to be passed to redactor when initializing the editor
        # (see http://imperavi.com/redactor/docs/settings for available options).
        # The default is...
        options { {} }
      end
    end
  end
end