2017 © Pedro Peláez
 

library twig-markdowner

Twig extension to turn Markdown formatted text into HTML

image

misd/twig-markdowner

Twig extension to turn Markdown formatted text into HTML

  • Tuesday, October 16, 2012
  • by StuBez
  • Repository
  • 1 Watchers
  • 4 Stars
  • 39 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

TwigMarkdowner

Converts text with Markdown syntax into HTML in Twig templates., (*1)

Authors

Installation

  1. Add TwigMarkdowner to your dependencies, (*2)

    // composer.json
    
    {
        // ...
        "require": {
            // ...
            "misd/twig-markdowner": "1.0.*"
        }
    }
  2. Use Composer to download and install TwigMarkdowner, (*3)

    $ php composer.phar update misd/twig-markdowner
  3. Instantiate a MarkdownParser and add the extension to the Twig environment, (*4)

    $parser = new \dflydev\markdown\MarkdownParser();
    
    /** @var $twig Twig_Environment */
    $twig->addExtension(new Misd\TwigMarkdowner\Twig\Extension\MarkdownerExtension($parser));

Usage

In a Twig template:, (*5)

    {{ "My *Markdown* text"|markdown }}

or, (*6)

    {{ object.property|markdown }}

Please note

This filter does not prevent the injection of arbitrary HTML and JavaScript; the output should be filtered (using HTMLPurifier, or equivalent) before being output in a template., (*7)

The Versions

16/10 2012

dev-master

9999999-dev https://github.com/misd-service-development/twig-markdowner

Twig extension to turn Markdown formatted text into HTML

  Sources   Download

MIT

The Requires

 

by Stuart Chapman

html markdown

09/10 2012

v1.0.2

1.0.2.0 https://github.com/misd-service-development/twig-markdowner

Twig extension to turn Markdown formatted text into HTML

  Sources   Download

MIT

The Requires

 

by Stuart Chapman

html markdown

26/09 2012

v1.0.1

1.0.1.0 https://github.com/misd-service-development/twig-markdowner

Twig extension to turn Markdown formatted text into HTML

  Sources   Download

The Requires

 

by Stuart Chapman

html markdown