Skip to content

PHP Markdown for CI 1.5.x

World Wide Web Server edited this page Jul 4, 2012 · 7 revisions

I added just a few lines of code to [url=http://www.michelf.com/projects/php-markdown/]PHP Markdown[/url] to integrate it as a CI library. This is a much less extensive hacking of the PHP Markdown source than the other CI integration (labeled for CI 1.4.x) already in the files area.

I can't see where to upload a file to this wiki, but just download [url=http://www.michelf.com/docs/projets/php-markdown-1.0.1f.zip]PHP Markdown 1.0.1f[/url], place it in your libraries/ folder as mkdn.php, and add these lines:

[code]

CodeIgniter Library Interface

rename this file to mkdn.php and place in libraries dir

Usage:

$this->load->library('mkdn');

$this->mkdn->translate($text);

if(defined('BASEPATH')) { class Mkdn { function translate($text) { return Markdown($text); } } } [/code]

Clone this wiki locally