Download the PHP package misd/twig-markdowner without Composer
On this page you can find all versions of the php package misd/twig-markdowner. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download misd/twig-markdowner
More information about misd/twig-markdowner
Files in misd/twig-markdowner
Download misd/twig-markdowner
More information about misd/twig-markdowner
Files in misd/twig-markdowner
Vendor misd
Package twig-markdowner
Short Description Twig extension to turn Markdown formatted text into HTML
License MIT
Homepage https://github.com/misd-service-development/twig-markdowner
Package twig-markdowner
Short Description Twig extension to turn Markdown formatted text into HTML
License MIT
Homepage https://github.com/misd-service-development/twig-markdowner
Please rate this library. Is it a good library?
Informations about the package twig-markdowner
TwigMarkdowner
Converts text with Markdown syntax into HTML in [Twig]() templates.
Authors
- Stuart Chapman [email protected]
Installation
-
Add TwigMarkdowner to your dependencies
// composer.json { // ... "require": { // ... "misd/twig-markdowner": "1.0.*" } }
-
Use Composer to download and install TwigMarkdowner
$ php composer.phar update misd/twig-markdowner
-
Instantiate a
MarkdownParser
and add the extension to the Twig environment$parser = new \dflydev\markdown\MarkdownParser(); /** @var $twig Twig_Environment */ $twig->addExtension(new Misd\TwigMarkdowner\Twig\Extension\MarkdownerExtension($parser));
Usage
In a Twig template:
{{ "My *Markdown* text"|markdown }}
or
{{ object.property|markdown }}
Please note
This filter does not prevent the injection of arbitrary HTML and JavaScript; the output should be filtered (using HTMLPurifier, or equivalent) before being output in a template.
All versions of twig-markdowner with dependencies
PHP Build Version
Package Version
The package misd/twig-markdowner contains the following files
Loading the files please wait ....