Official Textile Reference Manual for RedCloth 4

HTML Integration and Escapement

HTML spans

You can enclose a bit of text in an HTML span tag by enclosing it in parentheses. Then you can apply attributes to the span (see attributes).

Textile
I can put in a %(myclass)span with a class% like this.
Browser

I can put in a span with a class like this.

Inline code

To mark code in your text, surround the code with at signs.

Textile
On the command line, you can just type @redcloth@.
Browser

On the command line, you can just type redcloth.

Block code

You can insert a block of code with the bc. block signature.

Textile
bc. # Output "I love Ruby"
say = "I love Ruby"
puts say
Browser
# Output "I love Ruby"
say = "I love Ruby"
puts say

Use bc.. and the block of code will continue to include blank lines until you specify another block signature.

Textile
bc.. # Output "I love Ruby"
say = "I love Ruby"
puts say
 
# Output "I *LOVE* RUBY"
say['love'] = "*love*"
puts say.upcase
 
# Output "I *love* Ruby"
# five times
5.times { puts say }
Browser
# Output "I love Ruby"
say = "I love Ruby"
puts say
 
# Output "I *LOVE* RUBY"
say['love'] = "*love*"
puts say.upcase
 
# Output "I *love* Ruby"
# five times
5.times { puts say }

Inline HTML

You can use HTML right in your paragraph text, presuming the site administrator has not set :filter_html or :sanitize_html restrictions.

Textile
I can use HTML directly in my <span class="youbetcha">Textile</span>.
Browser

I can use HTML directly in my Textile.

Block HTML

You can use HTML freely within your RedCloth 4 Textile. HTML tags on a line by themselves will not be mangled. Don’t forget to leave a blank line after any Textile, just like usual.

Textile
<div id="shopping-cart">
<form action="form_action" method="get">
h3. Your cart

* Item one
* Item two

<input type="submit" value="Check Out" />
</form>
</div>
Browser

Your cart

  • Item one
  • Item two

No Textile

You can have RedCloth skip a chunk of text with the &lt;notextile&gt; tag or double-equals.

Textile
<notextile>
Don't touch this!
</notextile>

Use ==*asterisks*== to say something *strongly*.
Browser
Don't touch this!

Use *asterisks* to say something strongly.