mirror of
https://github.com/KnpLabs/KnpMarkdownBundle.git
synced 2024-05-19 05:46:33 +02:00
Merge branch 'master' of github.com:knplabs/MarkdownBundle
This commit is contained in:
commit
4cdc6af042
|
@ -1,21 +1,21 @@
|
|||
Provide markdown to Symfony 2 projects.
|
||||
Provide markdown conversion to your Symfony2 projects.
|
||||
|
||||
## INSTALLATION
|
||||
|
||||
Put MarkdownBundle to your src/Bundle dir.
|
||||
Put MarkdownBundle in your `src/Bundle` dir.
|
||||
|
||||
Then, enable it in your config.yml:
|
||||
Then enable it in your `config.yml`:
|
||||
|
||||
markdown.parser: ~ # Enable the parser service
|
||||
markdown.helper: ~ # Enable the helper for use in templates
|
||||
markdown.helper: ~ # Enable the helper in the templates
|
||||
|
||||
## USAGE
|
||||
|
||||
// Use the service
|
||||
$html = $this->container->markdownParser->transform($text);
|
||||
$html = $this->container['markdownParser']->transform($text);
|
||||
|
||||
// Use the helper
|
||||
echo $view->markdown->transform($text);
|
||||
echo $view['markdown']->transform($text);
|
||||
|
||||
## TEST
|
||||
|
||||
|
|
Loading…
Reference in a new issue