Skip to content
This repository has been archived by the owner on Apr 28, 2021. It is now read-only.

alecdotninja/rails_admin_redactor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Adds the redactor edit to Rails Admin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published