RailsAdminRedactor is a plugin that adds the Redactor wysiwyg editor to RailsAdmin.
- Add
gem "rails_admin_redactor"
to your Gemfile - Run
bundle install
- Add the redactor.css and redactor.js files to your project (get them here)
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