gremo/ciconia-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

Symfony bundle for Ciconia Markdown parser for PHP

Installs: 952

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Type:symfony-bundle

v1.0.1 2015-03-06 18:18 UTC

This package is auto-updated.

Last update: 2020-07-04 15:30:36 UTC


README

Latest stable Downloads total GitHub issues

Symfony bundle for Ciconia Markdown parser for PHP.

Installation

Add the bundle in your composer.json file:

{
    "require": {
        "gremo/ciconia-bundle": "~1.0"
    }
}

Then enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Gremo\CiconiaBundle\GremoCiconiaBundle(),
        // ...
    );
}

Configuration

Configuration is optional, extensions are disabled by default:

# GremoCiconiaBundle Configuration
gremo_ciconia:
    renderer: ~ # Or null or "html" or "xhtml"
    extensions: ~ # Enable all with true or null (false to disable)

To selectively enable an extension:

# GremoCiconiaBundle Configuration
gremo_ciconia:
    # ...
    extensions:
        fencedCodeBlock: ~ # Or true or null (false to disable) 
        # ...

Usage

Get the ciconia service from the service container:

/** @var \Ciconia\Ciconia $ciconia */
$ciconia = $container->get('ciconia');

// Refer to kzykhys/Ciconia for examples
$html = $ciconia->render('Markdown is **awesome**');

// <p>Markdown is <em>awesome</em></p>

Or in twig template:

{{ var|markdown }}

Dependency Injection Tags

Give the service a tag named ciconia.extension to automatically registered it as an extension.