Author: emjot GmbH & Co. KG
The redcloth-rails gem enables RedCloth for rails (>= 3.1).
It provides helpers to integrate the TextileEditor toolbar.
The rails 3.0 support and gemification was realized by ryanfelton (https://github.com/ryanfelton/textile-editor-helper).
- RedCloth (>= 4.2)
- rails (>= 3.1)
Installation (via Bundler)
Gemfile: gem "redcloth-rails"
Generate a config file
rails g textile_editor_config
Include the coffeescript and scss files in your asset manifests
app/assets/stylesheets/application.css: (...) *= require textile-editor
Enable the TextileEditor for your attributes in your form view:
<%= form_for(@post) do |f| %> (...) <%= f.textile_editor :content %> (...) <% end %> (Or, to generate the input field without the form builder:) <%= textile_editor :post, :content %>
Initialize the TextileEditor afterwards via:
<%= textile_editor_initialize %>
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request