Every repository with this icon (
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | Fri Apr 10 12:34:03 -0700 2009 | |
| |
README.rdoc | Sun Nov 08 12:12:10 -0800 2009 | |
| |
Rakefile | Fri Apr 10 12:34:03 -0700 2009 | |
| |
init.rb | Fri Apr 10 12:34:03 -0700 2009 | |
| |
install.rb | Fri Apr 10 12:34:03 -0700 2009 | |
| |
lib/ | Sun Nov 08 12:05:53 -0800 2009 | |
| |
spec/ | Sun Nov 08 12:05:53 -0800 2009 | |
| |
tasks/ | Fri Apr 10 12:34:03 -0700 2009 | |
| |
test/ | Fri Apr 10 12:34:03 -0700 2009 | |
| |
uninstall.rb | Fri Apr 10 12:34:03 -0700 2009 |
Textile Helpers
This Rails plugin provides some view helpers that enhance Textile support.
Installation
script/plugin install git@github.com:zeke/textile_helpers.git
As of Rails 2.3, You may also need to install the RedCloth gem..
sudo gem install redcloth
..and add this to environment.rb
config.gem "RedCloth"
Overview and Usage
The textilize_plus helper method works just like Rails’ textilize method, but with a few goodies added. It cleans up MS Word characters; repairs (some) faulty markup, such as heading tags (h1, h2, etc) not having a newline underneath them; adds an id attribute to headings based on the content of the heading.
textilize_plus(my_string)
The table_of_contents_for helper method is meant to be paired with textilize_plus. It parses your textilizable string and generate a hierarchical table of countents based on the h1, h2, and h3 headings.
<div id="main">
<%= textilize_plus(my_string) %>
</div>
<div id="sidebar">
<%= table_of_contents_for(my_string) %>
</div>
See lib/textile_helpers.rb for more details.
License
Copyright © 2009 Zeke Sikelianos, released under the MIT license







