core23/commonmark-formatter-bundle

This bundle provides a commonmark formatter for the Sonata FormatterBundle.


Keywords
symfony, sonata, markdown, formatter, commonmark, sonata-formatter, bundle, symfony-bundle
License
MIT

Documentation

CommonMarkFormatterBundle

Latest Stable Version Latest Unstable Version License

Total Downloads Monthly Downloads Daily Downloads

Build Status Scrutinizer Code Quality Code Climate Coverage Status

This bundle provides a commonmark formatter for the Sonata FormatterBundle.

Installation

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

composer require core23/commonmark-formatter-bundle

Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in config/bundles.php file of your project:

// config/bundles.php

return [
    // ...
    Core23\CommonMarkFormatterBundle\Core23CommonMarkFormatterBundle::class => ['all' => true],
];

To use the new formatter, register the formatter in config/packages/sonata_formatter.yaml file of your project:

sonata_formatter:
    formatters:
        commonmark:
            service: core23_commonmark.formatter

Add markdown extensions

If you want to use some Github-Flavored Markdown extensions, you need download the extension and register it inside the config/services.yaml file of your project:

services:
    League\CommonMark\Extras\CommonMarkExtrasExtension:
        tags: [ 'core23_commonmark.extension' ]