Textile Parser for SilverStripe 3
Extension to add optional Textile parsing to StringField objects
in templates, such as Text & Varchar., (*1)
It includes/uses the PHP Textile class from
netcarver/textile, (*2)
Requirements
Options
In mysite/_config.php
, (*3)
TextileParser::$doctype = 'xhtml'; // Use xhtml instead of html5
TextileParser::$use_restricted = false; // Use regular parser instead of restricted one (adds more features)
Usage
It is designed to be used in your templates where needed, such as:, (*4)
// convert the value into HTML, and convert raw web & email links into html links
$MyTextField.Textile
// which will convert the value into HTML, but leave links & emails as plain text
$MyTextField.Textile(0)