photon / template-markdown
Markdown parser for Photon template engine
Installs: 1 228
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 4
Forks: 1
Open Issues: 0
Language:Shell
Requires
- michelf/php-markdown: ~1.5.0
- photon/photon: >=0.3.0
README
Template tag to filter Markdown text to HTML
Quick start
-
Add the module in your project
composer require "photon/template-markdown:dev-master"
or for a specific version
composer require "photon/template-markdown:1.0.0"
-
Add the Tag and the Modifier in your template engine configuration
'template_tags' => array( 'Markdown' => '\photon\template\tag\Markdown', ), 'template_modifiers' => array( 'Markdown' => '\Michelf\MarkdownExtra::defaultTransform', ),
-
Write some template
{$mdtext|Markdown|safe}
or
{Markdown $mdtext}
- Enjoy