Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A simple ZF2 module for adding markdown support to Zend Framework 2 projects
branch: master

This branch is 29 commits behind EvanDotPro:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
configs
src
.gitmodules
Module.php
README.md
autoload_classmap.php
autoload_function.php
autoload_register.php

README.md

EdpMarkdown - ZF2 Markdown Module

Version 0.0.1 Created by Evan Coury

NOTE: THIS CURRENTLY DEPENDS ON A PATCH TO THE PLUGINBROKER THAT IS NOT MERGED INTO THE ZF2 MASTER. An alternative Service Locator strategy is being developed to replace the PluginBroker stuff in ZF2, so development of this module is currently on hold. You can still use this module, but it will require you manually inject the Markdown renderer into the view helper yourself somehow. See the DI configuration in this module for an idea of how this works.

Introduction

This ZF2 module simply adds markdown support to your project. It utilizes the PHP Markdown library written by Michel Fortin which is a PHP port of the original perl implementation by John Gruber.

Usage

With this module installed, using markdown in your view scripts is easy:

<?php $this->markdown()->start(); ?>
Hello, **this** is _markdown_!
<?php $this->markdown()->end(); ?>

or...

<?= $this->markdown('Hello, **this** is _markdown_!'); ?>

Configuration

By default, this module uses the "Markdown Extra" parser. If you'd like to switch it to just use the normal markdown parser, you can add the following DI alias to your config:

'markdown-parser' => 'Markdown_Parser'
Something went wrong with that request. Please try again.