chronon/markdown

A CakePHP 2.x Markdown helper packaged as a plugin.

2.1.0 2013-04-22 00:00 UTC

This package is not auto-updated.

Last update: 2024-10-26 14:17:25 UTC


README

DEPRECATION NOTICE: This CakePHP 2.x plugin is deprecated and will most likely not be updated.

A PHP Markdown helper packaged as a plugin.

This plugin works with Composer and is available on Packagist.

Installation:

Using Composer/Packagist:

If you are using composer, require chronon/markdown:

{
    "require": {
        "chronon/markdown": "*"
    },
	"config": {
        "vendor-dir": "Vendor"
    }
}

This will install the plugin into Plugin/Markdown, and install Markdown lib (from Packagist) into your Vendor directory.

In Config/bootstrap.php, import composer's autoload file:

<?php
App::import('Vendor', array('file' => 'autoload'));

Using git:

If you are not using composer, clone the repository:

git clone git@github.com:chronon/CakePHP-Markdown-Plugin.git APP/Plugin/Markdown

Usage:

In your controller:

<?php
public $helpers = array('Markdown.Markdown');

In your view:

<?php
echo $this->Markdown->md(markdown_to_be_converted_to_html);