I like it. thanks very much.
On Sep 10, 7:00 pm, Scott A S
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> TextFormatter plugin allows you filter user input, use the syntax gem,
> before it is saved to the database.
>
> If anyone has any suggestions or constructive feedback on these new
> plugins, please send them over.
>
> http://www.railslodge.com/blogs/12
>
> Install the plugin:
>
> ruby script\plugin
installhttp://svn.railslodge.com/svn/plugins/text_formatter/
>
> Install the following gems:
>
> gem install htmltokenizer
> gem install syntax
> gem install hpricot
>
> If you are using the syntax highlighting method, copy the css from
> /vender/plugins/text_formatter/stylesheets/text_formatter.css into your
> css file.
>
> The following methods can be used in your models:
>
> ===Remove HTML Tags
> Remove all html tags from the given fields
>
> tf_remove_html_tags :fieldname
> #e.g. tf_remove_html_tags :title, :post
>
> ===Escape HTML Characters
> Escape all tags and special characters
>
> tf_escape_html_characters :fieldname
> #e.g. tf_escape_all_html_characters :title, :post
>
> ===Escape Only Text Characters
> Escape all text except html tags
>
> tf_escape_text_characters :fieldname
> #e.g. tf_escape_text_characters :title, :post
>
> ===Syntax Highlighting
> Add syntax highlighting to all text within pre tags
>
> tf_syntax_highlighting :fieldname
> #e.g. tf_syntax_highlighting :title, :post
>
> ===Simple Text Markup
> Apply SimpleTextMarkup
>
> tf_simple_text_markup :fieldname
> #e.g. tf_simple_text_markup :title, :post
>
> ===Content Formatter
> Remove all html tags, SimpleTextMarkup, encode tags within html tags,
> syntax highlighting
>
> tf_content_formatter :fieldname
> #e.g. tf_content_formatter :title, :post
>
> ===Basic Formatter
> Remove all html tags, SimpleTextMarkup, encode tags within html tags
>
> tf_basic_formatter :fieldname
> #e.g. tf_basic_formatter :title, :post
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---