PHP code example of schumacherfm / markdown

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

    

schumacherfm / markdown example snippets


        Mage::dispatchEvent('markdown_merge_after_element_html', array(
            'instance' => $this,
        ));

 echo Mage::helper('markdown')->render($_description, [array $options] ); 

 echo Mage::helper('markdown')->render($this->helper('catalog/output')->productAttribute($this->getProduct(), $_description, 'description')); 

$instance = Mage::getModel('markdown/markdown_render');
$renderer = $instance=>getRenderer();
$renderer->empty_element_suffix = '>';
$renderer->tab_width = 5;
$instance->setOptions(array(
    'force'          => FALSE, // force rendering even if not markdown
    'protectMagento' => TRUE, // protect Magento widgets/variables ...
    'extra'          => FALSE, // force rendering of markdown extra if true
));
echo $instance->renderMarkdown('text goes here');