Ruby on Rails latest stable (v5.2.3) - 0 notes - Class: ActionView::Helpers::TextHelper

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here.

textilize(text, *options) public

Returns the text with all the Textile codes turned into HTML tags.

You can learn more about Textile’s syntax at its website. This method is only available if RedCloth is available.


  textilize("*This is Textile!*  Rejoice!")
  # => "<p><strong>This is Textile!</strong>  Rejoice!</p>"

  textilize("I _love_ ROR(Ruby on Rails)!")
  # => "<p>I <em>love</em> <acronym title="Ruby on Rails">ROR</acronym>!</p>"

  textilize("h2. Textile makes markup -easy- simple!")
  # => "<h2>Textile makes markup <del>easy</del> simple!</h2>"

  textilize("Visit the Rails website "here":http://www.rubyonrails.org/.)
  # => "<p>Visit the Rails website <a href="http://www.rubyonrails.org/">here</a>.</p>"

  textilize("This is worded <strong>strongly</strong>")
  # => "<p>This is worded <strong>strongly</strong></p>"

  textilize("This is worded <strong>strongly</strong>", :filter_html)
  # => "<p>This is worded &lt;strong&gt;strongly&lt;/strong&gt;</p>"
Show source
Register or log in to add new notes.