This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
CHANGELOG | Fri Jun 15 15:44:06 -0700 2007 | |
| |
MIT-LICENSE | Sun Mar 25 17:16:39 -0700 2007 | |
| |
README | Thu Aug 13 18:40:19 -0700 2009 | |
| |
Rakefile | Tue Mar 20 13:13:13 -0700 2007 | |
| |
assets/ | Tue Dec 16 07:19:49 -0800 2008 | |
| |
init.rb | Fri Sep 19 13:59:18 -0700 2008 | |
| |
install.rb | Tue Mar 20 11:54:14 -0700 2007 | |
| |
lib/ | Mon Aug 17 17:34:03 -0700 2009 | |
| |
tasks/ | Tue Mar 20 14:39:12 -0700 2007 | |
| |
test/ | Mon Aug 17 17:34:03 -0700 2009 |
README
= Textile Editor Helper v0.3 Textile Editor Helper is a plugin for Ruby on Rails to add a Textile toolbar above textareas This version of Textile Editor Helper is a fork of the code found at http://svn.webtest.wvu.edu/repos/rails/plugins/textile_editor_helper/ to allow for use with the form_for method. == Dependency To use Textile Editor Helper you must be using either the Prototype or jQuery JavaScript libraries. If using Prototype, the Textile Editor Helper starts up on the 'dom:loaded' custom event. If using jQuery, it uses the $(document).ready() method. == To use Textile Editor Helper Directions to get the helper up and running for your install: 1. run rake textile_editor_helper:install 2. for the textarea(s) that you want to add the TEH toolbar to replace the text area tag with: <% form_for(:user, :url => user_path(@user), :html => { :method => :put }) do |f| %> <%= f.textile_editor :description %> <% end %> **OR** <%= form_tag :controller => "users", :action => "edit", :id => @user.id %> <%= textile_editor :user, "website" %> </form> **OR** <%= textile_editor_tag 'description', :description -%> **just like writing a text area tag, same options** 3. at the end of your form put in the following code: <%= textile_editor_initialize -%> **Important!** If using jQuery, do textile_editor_initialize(:framework => :jquery) 4. save your view and check it out == Simple vs. Extended TEH has a built-in mode to show only a sub-selection of available tags called simple. Currently the 'simple' tags are: bold, underline, italic, strikethrough. To create a text area that will only use the 'simple' tags create your text area with the following code: <%= textile_editor 'object', 'field', :simple -%> == To modify Textile Editor Helper Most of the options that you might want to modify (e.g. access keystroke or whether a tag is available in simple) are found in textile_editor_config.js. Pretty straightforward. == More Info on Textile To learn more about Textile check out: Textism, http://www.textism.com/tools/textile/index.php & Textile Reference, http://hobix.com/textile/ == More Info on slate slate is the CMS in development at West Virginia University that led to the development of Textile Editor Helper. Learn more at: http://slateinfo.blogs.wvu.edu == License Textile Editor Helper is released under the MIT license. = Credits Textile Editor Helper was created by Dave Olsen (Javascript) and Chris Scharf (Ruby/Rails) of West Virginia University Web Services (http://webservices.wvu.edu/) = Inspired by Patrick Woods, http://www.hakjoon.com/code/38/textile-quicktags-redirect & Alex King, http://alexking.org/projects/js-quicktags







