kalmanolah / markdownbundle
Markdown/Parsedown bundle for Symfony2 providing a service and a twig filter
Installs: 261
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.0
- erusev/parsedown: *
- symfony/framework-bundle: >=2.1.0
Suggests
- symfony/twig-bundle: For the Twig filter
This package is not auto-updated.
Last update: 2023-07-08 09:08:57 UTC
README
Markdown/Parsedown bundle for Symfony2 providing a service and a twig filter
Installation
Just add this to your composer.json
:
...
"require": {
...
"kalmanolah/markdownbundle": "*@dev",
...
}
...
Afterwards, enable the bundle in your AppKernel.php
like so:
$bundles = array(
...
new KalmanOlah\MarkdownBundle\KalmanOlahMarkdownBundle(),
);
Usage
Using the service:
// Assuming you have a container handy
echo $this->get('markdown')->text('**Hello, world!**');
This would then print:
<b>Hello, world!</b>
Using the Twig filter:
{{ 'Hello, world!' | markdown }}