axllent/silverstripe-textile-parser

This package is abandoned and no longer maintained. No replacement package was suggested.

Textile Parser for SilverStripe 3

1.0.0 2014-06-12 01:15 UTC

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)