PHP code example of xenocrat / chyrp-markdown
1. Go to this page and download the library: Download xenocrat/chyrp-markdown library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
xenocrat / chyrp-markdown example snippets
// CommonMark; parse full text
$parser = new \xenocrat\markdown\Markdown();
echo $parser->parse($markdown);
// GFM
$parser = new \xenocrat\markdown\GithubMarkdown();
echo $parser->parse($markdown);
// GLM
$parser = new \xenocrat\markdown\GitlabMarkdown();
echo $parser->parse($markdown);
// CFM
$parser = new \xenocrat\markdown\ChyrpMarkdown();
echo $parser->parse($markdown);
// CommonMark; parse only inline elements (useful for one-line descriptions)
$parser = new \xenocrat\markdown\Markdown();
echo $parser->parseParagraph($markdown);