This plugin adds Parsedown support to Craft.
To install Parsedown, follow these steps:
- Upload the parsedown/ folder to your craft/plugins/ folder.
- Go to Settings > Plugins from your Craft control panel and enable the Parsedown plugin.
To use Parsedown in your templates, just pass some text into the parsedown
filter:
{{ entry.myBodyField|parsedown }}
A pd
shortcut filter is also available:
{{ entry.myBodyField|pd }}
The filters also work in a single-line mode, where the text that’s passed in will not include wrapping <p>
tags:
<h1>{{ entry.title|parsedown('line') }}</h1>
Other plugins can take advantage of Parsedown using the provided API:
$parsedText = craft()->parsedown->parseText($entry->myBodyField);
$parsedLine = craft()->parsedown->parseLine($entry->title);
- Updated erusev/parsedown to 1.6.1.
- Updated to take advantage of new Craft 2.5 plugin features.
- Initial release.