<title>CodeMirror: Textile mode</title>
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
<script src="textile.js"></script>
<style>.CodeMirror {background: #f8f8f8;}</style>
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
<li><a href="../../index.html">Home</a>
<li><a href="../../doc/manual.html">Manual</a>
<li><a href="https://github.com/marijnh/codemirror">Code</a>
<li><a href="../index.html">Language modes</a>
<li><a class="active" href="#">Textile</a>
<form><textarea id="code" name="code">
A paragraph without formatting.
Here are some simple phrase modifiers: *strong*, _emphasis_, **bold**, and __italic__.
A ??citation??, -deleted text-, +inserted text+, some ^superscript^, and some ~subscript~.
A %span element% and @code element@
A "link":http://example.com, a "link with (alt text)":urlAlias
[urlAlias]http://example.com/
An image: !http://example.com/image.png! and an image with a link: !http://example.com/image.png!:http://example.com
A sentence with a footnote.[123]
fn123. The footnote is defined here.
Registered(r), Trademark(tm), and Copyright(c)
- definition list := description
- another item := foo bar
Layouts and phrase modifiers can be modified with various kinds of attributes: alignment, CSS ID, CSS class names, language, padding, and CSS styles.
h3. CSS ID and class name
You are a %(my-id#my-classname) rad% person.
p[en_CA]. Strange weather, eh?
p(())). 2em left padding, 3em right padding
p{background: red}. Fire!
|_. Header 1 |_. Header 2 |
|{background:#ddd}. Cell with background| Normal |
|\2. Cell spanning 2 columns |
|/2. Cell spanning 2 rows |(cell-class). one |
|>. Right aligned cell |<. Left aligned cell |
h3. A table with attributes:
return n * factorial(n - 1);
h2. Temporarily disabling textile markup
notextile. Don't __touch this!__
Surround text with double-equals to disable textile inline. Example: Use ==*asterisks*== for *strong* text.
Some block layouts are simply textile versions of HTML tags with the same name, like @div@, @pre@, and @p@. HTML tags can also exist on their own line:
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
<p><strong>MIME types defined:</strong> <code>text/x-textile</code>.</p>
<p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#textile_*">normal</a>, <a href="../../test/index.html#verbose,textile_*">verbose</a>.</p>