PHP code example of cipemotion / commonmark

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

    

cipemotion / commonmark example snippets


// When `$allowHtml` is `true` HTML is _not_ removed in the output, default is false
$converter = \CipeMotion\CommonMark\Markdown::getInlineConverter($allowHtml);

$html = $converter->convertToHtml('This is _awesome_!')->getContent();
// or
$html = (string)$converter->convertToHtml('This is _awesome_!');