2010-09-12 12:20:29 +02:00
|
|
|
Provide markdown conversion to your Symfony2 projects.
|
2010-05-05 18:38:36 +02:00
|
|
|
|
|
|
|
## INSTALLATION
|
|
|
|
|
2010-09-12 12:20:29 +02:00
|
|
|
Put MarkdownBundle in your `src/Bundle` dir.
|
2010-05-05 18:38:36 +02:00
|
|
|
|
2010-09-12 12:20:29 +02:00
|
|
|
Then enable it in your `config.yml`:
|
2010-05-05 18:38:36 +02:00
|
|
|
|
2010-05-06 15:20:04 +02:00
|
|
|
markdown.parser: ~ # Enable the parser service
|
2010-09-12 12:20:29 +02:00
|
|
|
markdown.helper: ~ # Enable the helper in the templates
|
2010-05-05 18:38:36 +02:00
|
|
|
|
|
|
|
## USAGE
|
|
|
|
|
2010-05-06 15:20:04 +02:00
|
|
|
// Use the service
|
2010-09-12 12:20:29 +02:00
|
|
|
$html = $this->container['markdownParser']->transform($text);
|
2010-05-06 15:20:04 +02:00
|
|
|
|
|
|
|
// Use the helper
|
2010-09-12 13:25:50 +02:00
|
|
|
echo $view['markdown']->transform($text);
|
2010-07-22 12:06:54 +02:00
|
|
|
|
|
|
|
## TEST
|
|
|
|
|
|
|
|
phpunit -c myapp src/Bundle/MarkdownBundle
|