PHP code example of mrgeneral / parsedown-extension

1. Go to this page and download the library: Download mrgeneral/parsedown-extension 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/ */

    

mrgeneral / parsedown-extension example snippets

 php
        $text = <<<EOL
[TOC]
# This is head 1
## This is head 1-1
### This is head 1-3
# Sample text of head 2
## Sample text of head 2-1
EOL;

        $content = ParsedownExtension::instance()
            ->setTocEnabled(true)
            ->text($text);