Skip to content

Commit

Permalink
Added a Textile Syntax example chart.
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Apr 17, 2009
1 parent 4aea73b commit ab6785e
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 2 deletions.
6 changes: 4 additions & 2 deletions views/notes_edit.erb
Expand Up @@ -2,10 +2,12 @@
<input type="hidden" name="id" value="<%= @note.id %>" />

<label>Title:</label>
<input type="text" name="note[title]" value="<%= @note.title.dump %>"/>
<input type="text" name="note[title]" value="<%= escape_html @note.title.dump %>"/>

<p>Summary:</p>
<textarea name="note[summary]">
<%= @note.summary %>
<%= escape_html @note.summary %>
</textarea>

<%= erb :syntax, :layout => false %>
</form>
2 changes: 2 additions & 0 deletions views/notes_new.erb
Expand Up @@ -4,4 +4,6 @@

<p>Summary:</p>
<textarea name="note[summary]"></textarea>

<%= erb :syntax, :layout => false %>
</form>
50 changes: 50 additions & 0 deletions views/syntax.erb
@@ -0,0 +1,50 @@
<p>Textile Syntax:</p>
<table id="textile_syntax">
<th>
<td>Textile</td>
<td>HTML</td>
</th>

<tr>
<td>_italic_</td>
<td><i>italic</i></td>
</tr>

<tr>
<td>*strong*</td>
<td><b>strong</b></td>
</tr>

<tr>
<td>"Link Text":http://example.com/</td>
<td><a href="http://example.com/">Link Text</a></td>
</tr>

<tr>
<td>
* item one<br />
* item two
</td>

<td>
<ul>
<li>item one</li>
<li>item two</li>
</ul>
</td>
</tr>

<tr>
<td>
# item one<br />
# item two
</td>

<td>
<ol>
<li>item one</li>
<li>item two</li>
</ol>
</td>
</tr>
</table>

0 comments on commit ab6785e

Please sign in to comment.