axllent / silverstripe-textile-parser
Textile Parser for SilverStripe 3
Installs: 27
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Type:silverstripe-module
Requires
This package is auto-updated.
Last update: 2020-01-27 12:52:08 UTC
README
Extension to add optional Textile parsing to StringField objects in templates, such as Text & Varchar.
It includes/uses the PHP Textile class from netcarver/textile
Requirements
- SilverStripe 3.*
Options
In mysite/_config.php
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:
// 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)