Sha256: b3057a71daac9a0a582a8e17577bdbab2c4b13a93da392b9c10e66ef6abc3f0d
Contents?: true
Size: 1.44 KB
Versions: 2
Compression:
Stored size: 1.44 KB
Contents
# Rails 3.2 Integration for Redactor The redactor-rails gem integrates the [Redactor](http://redactorjs.com/) editor with the Rails 3.2 asset pipeline. ## Installation Add this line to your application's Gemfile: gem 'redactor-rails' And then execute: $ bundle install Or install it yourself as: $ gem install redactor-rails ### Now generate models for store uploading files #### ActiveRecord + carrierwave gem "carrierwave" gem "mini_magick" $ rails generate redactor:install $ rake db:migrate Create a `config/redactor.yml` file with your global configuration options: lang: 'zh_tw' autoresize: true See the [Redactor Documentation](http://redactorjs.com/docs/settings/) for a full list of configuration options. ### Include the Redactor assets Add to your `application.js`: //= require redactor-rails Add to your `application.css`: *= require redactor-rails ### Initialize Redactor For each textarea that you want to use with Redactor, add the "redactor" class and ensure it has a unique ID: <%= text_area_tag :editor, "", :class => "redactor", :rows => 40, :cols => 120 %> Then invoke the `redactor` helper to initialize Redactor: <%= redactor %> ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Added some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
redactor-rails-0.1.1 | README.md |
redactor-rails-0.1.0 | README.md |