= textile_toolbar

Adds a handy Textile toolbar to any text area. The toolbar currently offers
the following functions:

  - Bold: select some text and click this button to make it bold.
  - Italic: select some text and click this button to make it italic.
  - Insert Hyperlink: select some text, click, enter URL, and link is inserted.
  - Insert Image: click, enter image URL, and image is inserted at cursor.

A link to a Textile reference page is also shown beside the toolbar.


== Installation

Install the gem directly:

  gem sources -a http://gems.github.com (you only have to do this once)
  sudo gem install pelargir-textile_toolbar
  
Or install the gem in your Rails project as a plugin:
  
  script/plugin install git://github.com/pelargir/textile_toolbar.git

Or clone the project:

  git clone git://github.com/pelargir/textile_toolbar.git

Then copy the required image and JS files into your Rails project

  rake textile_toolbar:install_files


== Usage

Use the textile_area helper where you would normally use the text_area
helper. Yep, it's that simple!

  <%= text_area :article, :body %>      # plain old text area
  <%= textile_area :article, :body %>   # text area with Textile toolbar

Form blocks are not yet supported, so you can't do this:

  <% form_for :article do |f| -%>
    <%= f.textile_area :body %>
  <% end -%>

Instead, you'll need to do this:

  <% form_for :article do |f| -%>
    <%= textile_area :article, :body %>
  <% end -%>


== Resources

Repository: http://github.com/pelargir/textile_toolbar/
Blog: http://matthewbass.com
Author: Matthew Bass

Extraction work sponsored by Terralien