Godmin Redactor

Gem Version

Godmin Redactor is a Redactor component for Godmin that adds an f.redactor_area to forms.

Installation

Add the gem to the application's Gemfile:

gem "godmin-redactor"

Or to the admin engine's gemspec:

s.add_dependency "godmin-redactor", "~> 0.1.0"

Require it in your app/assets/javascripts/application.js, just after the require godmin line:

//= require godmin
//= require godmin-redactor

And finally, do the same with your app/assets/stylesheets/application.css:

*= require godmin
*= require godmin-redactor

Usage

Use the redactor area in your form like so:

<%= form_for @resource do |f| %>
  <%= f.text_field :title %>
  <%= f.redactor_area :body, {
    buttons: ['formatting', 'bold', 'italic'],
    plugins: ['fullscreen']
  } %>
  <%= f.submit %>
<% end %>

Contributors

https://github.com/varvet/godmin-redactor/graphs/contributors

License

Godmin Redactor is licensed under the MIT license. See the separate MIT-LICENSE file.

Redactor has 3 different licenses. For details please see License Agreement.