RedCloth is a module for using Textile in Ruby. Textile is a simple text format that can be converted to HTML, eliminating the need to use HTML directly to create documents, blogs, or web pages. Textile gives you readable text while you’re writing and beautiful text for your readers. If you need to break out into HTML, Textile allows you to do so easily.

Textile to HTML
_emphasized_ emphasized
*strong* strong
"Ruby on Rails":http://www.rubyonrails.org Ruby on Rails
* an item
* and another
  • an item
  • and another
# one
# two
  1. one
  2. two

Installing RedCloth 4.0

Using RubyGems

$ gem install RedCloth

NB: RedCloth is CamelCase, not lowercase. If you mistakenly do a gem install redcloth, you’ll get ERROR: could not find redcloth locally or in a repository.

From source

To install from source, get it from the repository:

$ git clone git://github.com/jgarber/redcloth.git
$ cd redcloth
$ rake install

You’ll need Ragel to compile it.

Using RedCloth

RedCloth.new("Some text").to_html
  #=> "<p>Some text</p>"

See the Official Textile Reference Manual for RedCloth 4 for help with Textile formatting.

Reporting bugs

Bug tracking is on Lighthouse. Please only report bugs about RedCloth 4.0. The 3.0.4 version’s bugs are many and well-known

For the latest information on installing, bugs, and contributions, see the development site.