gem 'redactor-dragonfly', github: 'dnitta/redactor-dragonfly'
$ rails generate redactor_dragonfly:install
- Buy licence and download latest
redactor.js
from http://imperavi.com/redactor/ . - Set
redactor.js
to/app/assets/javascripts/redactor_dragonfly/
of your app. - Add
//= require redactor_dragonfly
to/app/assets/javascripts/application.js
of your app. - Add
//= require redactor_dragonfly/langs/XX
to/app/assets/javascripts/application.js
of your app, if you need other language. - Add
*= require redactor_dragonfly
to/app/assets/stylesheets/application.css
of your app.
Sample html is below.
<textarea class="redactor"></textarea>
<script>
$(function(){
$('.redactor').redactor({
imageGetJson:"/redactor_dragonfly/images",
imageUpload:"/redactor_dragonfly/images?" + window.csrf_argument,
fileUpload:"/redactor_dragonfly/files?" + window.csrf_argument,
lang:"ja"
});
});
</script>
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
the redactor-dragonfly
project is MIT-LICENSE.
Redactor has 3 different licenses for any use. For details please see License Agreement.