Welcome Guest, Not a member yet? Register   Sign In
Using Markdownify with CI, doesn't work? Nothing happens.
#3

[eluser]GDmac - expocom[/eluser]
I downloaded PHP Markdown Extra from Michelf
(which has some extra features like inline HTML and tables)
http://michelf.com/projects/php-markdown/extra/

Renamed markdown.php to markdown_helper.php and
dropped it in the helpers directory. Load and use the helper
Code:
$this->load->helper('markdown');
$my_var = markdown($my_var);

Edit
To use markdownify i made a subdir in the libraries directory
/system/application/libraries/markdownify
and put the files in there. Then from the CI guide
- File names must be capitalized. For example: Myclass.php (changed the filenames)
- Class declarations must be capitalized. For example: class Myclass (changed the classname)
- Class names and file names must match.
Load and use the library
Code:
$this->load->library('markdownify/Markdownify_extra');
$md = new Markdownify_Extra;
$my_var = $md->parseString("<b>test</b>");
works fine, outputs **test**
Code:
$this->markdownify_extra->parseString("<b>test</b>"); // also works


Messages In This Thread
Using Markdownify with CI, doesn't work? Nothing happens. - by El Forum - 04-24-2010, 07:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB