dev-master
9999999-devCakephp Markdown plugin for CakePHP 3.
MIT
The Requires
The Development Requires
by tanuck
v0.1.0
0.1.0.0Cakephp Markdown plugin for CakePHP 3.
MIT
The Requires
The Development Requires
by tanuck
Cakephp Markdown plugin for CakePHP 3.
CakePHP 3 plugin to parse markdown syntax in your view templates., (*2)
Include the following in your composer.json
file:, (*3)
"require": { "tanuck/cakephp-markdown": "dev-master" }
and then run:, (*4)
composer update
, (*5)
To your config/bootstrap.php
file add Plugin::load('Tanuck/Markdown');
, (*6)
Then, load the helper where needed. For example, in your controller:, (*7)
class FooController extends AppController { public $helpers = ['Tanuck/Markdown.Markdown']; }
then in your templates, you can output markdown syntax like so:, (*8)
echo $this->Markdown->transform($myMarkdownSyntax);
Markdown is rendered using the cebe/markdown library which offers 3 different markdown parser classes., (*9)
By default, the plugin will use Markdown, the first of the 3 above. However you can specify which of the 3 you use wish to use when loading the helper. Like so:, (*10)
class FooController extends AppController { public $helpers = [ 'Tanuck/Markdown.Markdown' => [ 'parser' => 'GithubMarkdown' ] ]; }
cakephp-markdown is offered under an MIT license., (*11)
Cakephp Markdown plugin for CakePHP 3.
MIT
Cakephp Markdown plugin for CakePHP 3.
MIT