axllent / silverstripe-textile-parser
此包已被弃用,不再维护。未建议替代包。
为 SilverStripe 3 的 Textile 解析器
1.0.0
2014-06-12 01:15 UTC
Requires
This package is auto-updated.
Last update: 2020-01-27 12:52:08 UTC
README
扩展,用于在模板中的 StringField 对象(如 Text & Varchar)中添加可选的 Textile 解析。
它包括/使用来自 netcarver/textile 的 PHP Textile 类。
要求
- SilverStripe 3.*
选项
在 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)
用法
它旨在在需要的地方使用,例如
// 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)