-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Usage
Emanuil Rusev edited this page Apr 25, 2014
·
20 revisions
Basic usage:
$text = 'Hello *Parsedown*!';
echo Parsedown::instance()->parse($text); # would print <p>Hello <em>Parsedown</em>!</p>
Using the constructor:
$text = 'Hello *Parsedown*!';
$Parsedown = new Parsedown();
echo $Parsedown->parse($text); # would print <p>Hello <em>Parsedown</em>!</p>
Using options:
$text = "1st line \n 2nd line";
echo Parsedown::instance()
->set_breaks_enabled(true) # enables automatic line breaks.
->parse($text); # would print <p>1st line <br /> 2nd line</p>