public
Rubygem
Description: Adds a handy toolbar to any Textile-enabled text area.
Homepage: http://terralien.com/projects/textile-toolbar/
Clone URL: git://github.com/pelargir/textile_toolbar.git
Click here to lend your support to: textile_toolbar and make a donation at www.pledgie.com !
Matthew Bass (author)
Thu Apr 16 10:39:04 -0700 2009
commit  359a18afb991b4469f0c1e4580d69973c0711db8
tree    0faf20ab4a9dccd783644ea2f7256d523d599896
parent  0ed9988572cb45dbb25cf4e3119df0d012cade6e
name age message
file .gitignore Thu Aug 21 12:44:10 -0700 2008 initial commit [Matthew Bass]
file CHANGELOG Wed Oct 22 09:02:09 -0700 2008 added documentation [Matthew Bass]
file MIT-LICENSE Mon Oct 27 08:56:15 -0700 2008 updated readme [Matthew Bass]
file README Sat Nov 08 09:39:20 -0800 2008 updated readme [Matthew Bass]
file Rakefile Thu Aug 21 12:44:10 -0700 2008 initial commit [Matthew Bass]
file TODO Tue Nov 18 09:46:23 -0800 2008 added underlining button to toolbar [Matthew Bass]
file deleted_files Mon Nov 03 19:06:36 -0800 2008 installed asset_copier plugin [Matthew Bass]
directory files/ Tue Nov 18 09:46:23 -0800 2008 added underlining button to toolbar [Matthew Bass]
file init.rb Mon Nov 03 19:06:36 -0800 2008 installed asset_copier plugin [Matthew Bass]
file install.rb Mon Nov 03 19:06:36 -0800 2008 installed asset_copier plugin [Matthew Bass]
directory lib/ Thu Apr 16 10:39:04 -0700 2009 another minor bug fix [Matthew Bass]
directory tasks/ Mon Nov 03 19:06:36 -0800 2008 installed asset_copier plugin [Matthew Bass]
directory test/ Sat Nov 08 06:45:59 -0800 2008 began adding tests [Matthew Bass]
file textile_toolbar.gemspec Mon Oct 27 08:56:15 -0700 2008 updated readme [Matthew Bass]
= 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:

  sudo gem install pelargir-textile_toolbar --source=http://gems.github.com
  
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

== 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 supported, letting you do this also:

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

Any options that can be passed to text_area can also be passed to textile_area.
For example, to set the width and height:

  <%= textile_area :article, :body, :rows => 5, :cols => 10 %>

== Resources

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

Extraction work sponsored by Terralien