redcloth-rails

Homepage: Github Author: emjot GmbH & Co. KG

The redcloth-rails gem enables RedCloth for rails (>= 3.1). It provides helpers to integrate the TextileEditor toolbar and its assets are pipeline ready …

History

The TextileEditor was created by Dave Olsen (Javascript) and Chris Scharf (Ruby/Rails) of West Virginia University Web Services . The rails 3.0 support and gemification was realized by ryanfelton (https://github.com/ryanfelton/textile-editor-helper).

Dependencies

  • RedCloth (>= 4.2)
  • Rails (>= 3.1)
  • Rails Asset Pipeline
  • JQuery

Installation (via Bundler)

Gemfile:
gem "redcloth-rails"

Setup

Generate a config file

rails g textile_editor_config

Include the coffees script and scss files in your asset pipeline

app/assets/javascripts/application.js:
(...)
//= require textile-editor
//= require ./textile-editor-config
app/assets/stylesheets/application.css:
(...)
*= require textile-editor

Usage

Enable the TextileEditor for your attributes via:

<%= textile_editor :content %>

Initialize the TextileEditor afterwards via:

<%= textile_editor_initialize %>

Links

redcloth.org textile_editor_helper textile_editor_helper more info on textile