mirror of
https://github.com/bcit-ci/CodeIgniter.git
synced 2025-02-20 11:13:29 +08:00
...
parent
ef433429a2
commit
b2b9cdafd5
@ -1,3 +1,19 @@
|
||||
I added just a few lines of code to PHP Markdown 1.0.1f (http://www.michelf.com/projects/php-markdown/) 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 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.
|
||||
|
||||
[[File:PHPMarkdownForCI.zip]]
|
||||
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]
|
Loading…
x
Reference in New Issue
Block a user