Revision 13 - 2009-03-20 at 08:39:19

MojoMojo Cheatsheet

In MojoMojo, you can write wiki pages using HTML and one of two popular lightweight markup languages: Textile and Markdown. While you must currently choose between Textile and Markdown when creating your wiki, HTML is always available, for a few good reasons.

Choosing between Textile2 and MultiMarkdown

Textile2 is an extension to Textile, adding extended blocks (blocks that can contain a newline). MultiMarkdown is an extension to Markdown, adding support for tables, footnotes, bibliography, automatic cross-references, glossaries, appendices, definition lists, math syntax, anchor and image attributes, and document metadata. etc.

One major problem with Textile2 is that newlines break lists. It thus becomes impossible to render blockquotes or blocks of code in lists because the "bq." or "bc." block signature requires being surrounded by blank lines, and blank lines break lists:

# First,

bq. Avoid problems, and you'll never be the one who overcame them.
-- Richard Bach

# Second item, but will be numbered "1"

bq. There is no elevator to success. You have to take the stairs.

The workaround for Textile is to fallback to HTML.

Markdown's documentation explicitly tells how to "put a blockquote within a list item".

Generally, Markdown is more powerful, and Textile is simpler. The basic differences between the two syntaxes are:

  • link syntax
    • Textile: "Link text":
    • Markdown: [Link text](
  • emphasis
    • Textile: *bold*, _italic_
    • Markdown is more semantic: *italic* ('em'), **bold** ('strong')
  • backslash-escaping: Textile can't escape characters (you have to use their HTML code, e.g. * for a *. In Markdown, you just write \*.
  • auto-hyperlinking:
    • Textile automatically hyperlinks URLs
    • Markdown: you need to enclose the URL in angle brackets: <>
  • both Textile2 and MultiMarkdown have a syntax for definition lists but MojoMojo currently doesn't support the MultiMarkdown syntax.
  • pipe characters in text within table cells must be escaped as &#124; (backslash-escaping doesn't work in this case with MultiMarkdown). MultiMarkdown allows linebreaks in tables after the first row.

To switch MojoMojo to use Textile, go to the Edit Settings page.


Wikilinks are interpreted by MojoMojo separately and have the same syntax, regardless of the formatter being Textile2 or MultiMarkdown:

What you see MojoMojo Wikilinks Wikipedia
MojoMojo features MojoMojo [[/features]] MojoMojo [[features]]
MojoMojo editing cheatsheet MojoMojo [[/documentation/cheatsheet | editing cheatsheet]] MojoMojo [[cheatsheet | editing cheatsheet]]

Table headers and cell alignment

Example copied from the MultiMarkdown syntax guide:

Prototype table
First Header Second Header Third Header
Content Long Cell
Content Cell Cell
New section More Data
And more And more

The CSS doesn't currently match the one in the MultiMarkdown example. This is an easy fix; please consider submitting a patch to mojomojo.css.

My tags:
Popular tags:
Powered by Catalyst