From the BlogMy Portfolio

Textile Markup with MediaWiki, Revisited

Following Jim Wilson’s comment I have revisted this subject and now offer my own extension which adds Textile2 to the AlternateSyntaxParser without the need for hacking Jim’s original extension.

You can download the extension here.

Instructions are included in the source, but for convenience, they are repeated here…

Installation:

  1. Install the AlternateSyntaxParser extension.
  2. Drop this script (AlternateSyntaxParserTextile2.php) into $IP/extensions/AlternateSyntaxParser
  1. Enable the extension by adding this line to your LocalSettings.php:
require_once('extensions/AlternateSyntaxParser/MarkdownSyntax.php'); after the line enabling the AlternateSyntaxParser
  1. Download the Textile2 library
  2. Extract the file classTextile.php from the downloaded archive.
  1. Drop classTextile.php into $IP/extensions/AlternateSyntaxParser/

Usage:

To use Textile2 in a page, put #MARKUP textile2 at the top of the page:

Alternatively, you may specify a site-wide default alternate language by setting the $wgAlternateSyntaxParserLanguage variable in your LocalSettings.php.

$wgAlternateSyntaxParserLanguage = ‘textile2’;

Comments

  1. are you positive about

    require_once(‘extensions/AlternateSyntaxParser/MarkdownSyntax.php’);

    when the zip-archive only contains a file named AlternateSyntaxParserTextile2.php?

Trackbacks

  1. […] Textile Markup with MediaWiki requires AlternateSyntaxParser extension in mediawiki (tags: textile mediawiki) Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages. […]

Leave a Reply