Image upload management provided by paperclip gem
for the Redactor WYSIWYG editor
In your Gemfile
, add the following dependencies:
gem 'paperclip'
gem 'redactor-paperclip'
Run:
$ bundle install
And then run:
rails g redactor:install
Finally run:
rake db:migrate
Add to your css file (usually app/assets/stylesheets/application.css
)
*= require redactor
And to your javascript file (usually app/assets/javascripts/application.js
)
//= require redactor
In your javascript file:
$(document).ready(function()
{
$('textarea').redactor({ imageUpload: 'paperclip' });
})
See the Redactor Documentation for a full list of configuration options.
Redactor has 3 different licenses for commercial use. For details please see License Agreement.