Skip to content

Kirby 3.6.6

Markdown parser

Add your own Markdown parser

/site/plugins/markdown-parser/index.php
Kirby::plugin('my/markdown', [
    'components' => [
        'markdown' => function (Kirby $kirby, string $text = null, array $options = [], bool $inline = false) {
            return YourMarkdownParser::parse($text);
        }
    ]
]);

Parameters

Name Type Default Description
$kirby * Kirby\Cms\App Kirby instance
$text string null Text to parse
$options array [ ] Markdown options
$inline bool false Whether to wrap the text in <p> tags (deprecated: set via $options['inline'] instead)

Return type

string