Inheritance diagram for MTLikeTextile:
Public Member Functions | |
MTLikeTextile ($options=array()) | |
Private Member Functions | |
process_quotes ($str) | |
format_url ($args) |
Brad Choate's mttextile Movable Type plugin adds some additional functionality to the Textile.pm Perl module. This includes optional "SmartyPants" processing of text to produce smart quotes, dashes, etc., code colorizing using Beautifier, and some special lookup links (imdb, google, dict, and amazon). The MTLikeTextile
class is a subclass of Textile
that provides an MT-like implementation of Textile to produce results similar to that of the mttextile plugin. Currently only the SmartyPants and special lookup links are implemented.
Using the MTLikeTextile
class is exactly the same as using Textile
. Simply use $textile = new MTLikeTextile;
instead of $textile = new Textile;
to create a Textile object. This will enable the special lookup links. To enable SmartyPants processing, you must install the SmartyPants-PHP implementation available at http://monauraljerk.org/smartypants-php/ and include the SmartyPants-PHP.inc file.
include_once("Textile.php");
include_once("SmartyPants-PHP.inc");
$text = <<<EOT
h1. Heading
A _simple_ demonstration of Textile markup.
* One
* Two
* Three
"More information":http://www.textism.com/tools/textile is available.
EOT;
$textile = new MTLikeTextile;
$html = $textile->process($text);
print $html;
Definition at line 3337 of file Textile.php.
|
Instantiates a new MTLikeTextile object. Optional options can be passed to initialize the object. Attributes for the options key are the same as the get/set method names documented here.
Definition at line 3349 of file Textile.php. |
|
Takes the given
Reimplemented from Textile. Definition at line 3367 of file Textile.php. References format_url(). Referenced by format_url(). |
|
Processes string, formatting plain quotes into curly quotes.
Reimplemented from Textile. Definition at line 3356 of file Textile.php. References process_quotes(). Referenced by process_quotes(). |