HowTo write in Textile

This section will familiarize you with the markup and use of Textile. It can greatly improve your efficency in creating page content and thus make populating your developers portal faster.

Goal

By the end of this HowTo you should be able to start writing all your pages content in Textile markup.

The Guide

Introducing Textile

Textile is a lightweight markup language. Textile converts its marked-up text input to valid, well-formed XHTML and also inserts character entity references for apostrophes, opening and closing single and double quotation marks, ellipses and em dashes. The main advantage of Textile over pure HTML is the ease of creating elements like tables, lists and formatting paragraphs. In the following sections we will show the code and the outcome of Textile in two columns. One will contain the code, another one the rendered outcome. If you would like to see the html code, you could use tools like Firebug or DevelopersTools for various browsers.

The Reference

This guide bases on the RedCloth Textile implementation used in the 3Scale system.

Paragraphs and typography


h1. Sample Textile Markup
This is a sample textile paragraph
A line break
	is a line break
h1. Many 
h2. different 
h3. headers
"This is a link":http://3scale.net
bq. Even a block quotation
Some _emphasis_ and *strengthening* words with __cursive__ and **bold** font.
			

Sample Textile Markup

This is a sample textile paragraph

A line break
is a line break

Many

different

headers

This is a link

Even a block quotation

Some emphasis and strengthening words with cursive and bold font.

Code blocks


@Short code samples are possible too@
<pre><code>
	as well as the long ones
	with many
		lines
		...
</ code></pre>
			

Short code samples are possible too



as well as the long ones
with many
	lines
	...
		

Tables

And a sample table
table(main-table).
|_. Header1|_. Header2|_. Header3|
|_. Row1|Dummy|Content|
|_. Row2|Dummy|Content|
|_. Row3|Dummy|Content|
|_. Row4|Dummy|Content|

table(main-table).
|{background:#ccc}. Cell with styled background|Normal cell|
|\2. Cell spanning 2 columns|
|/2. Cell spanning 2 rows|one|
|two|
|>. Right-aligned cell|<. Left-aligned cell|

Header1 Header2 Header3
Row1 Dummy Content
Row2 Dummy Content
Row3 Dummy Content
Row4 Dummy Content


Cell with styled background Normal cell
Cell spanning 2 columns
Cell spanning 2 rows one
two
Right-aligned cell Left-aligned cell

Lists

# And
# a numbered list
## with nested
## elements

*  Also
*  a
**  bulleted
**  one

  1. And
  2. a numbered list
    1. with nested
    2. elements
  • Also
  • a
    • bulleted
    • one

Images and HTML markup


An image !https://support.3scale.net/logo-3scale.png(An alt text for the image)!
<p>You can also mix in some HTML</p>
			

An image An alt text for the image

You can also mix in some HTML

Classes and IDs


p(class1). This paragraph has a custom class __class1__
p(#id1). And this one an id __id1__
			

This paragraph has a custom class class1

And this one an id id1