Skip to content

Files

Latest commit

author
Kevin Danezis
Apr 1, 2015
0ae180e · Apr 1, 2015

History

History
46 lines (37 loc) · 1.3 KB

README.md

File metadata and controls

46 lines (37 loc) · 1.3 KB

Markdown Parser

A wrapper for MARKDOWN's engines for CmsMadeSimple with differents rendering engines

If it's the first time you play with Markdown, please take a few moment to read this

You can call the parser in differents way

<?php 
  $parser = ModuleOperations::get_instance()->get_module_instance('Parser');
  echo $parser->GetParserInstance()->process($text);
?> 

or

<?php 
  $config = cmsms()->GetConfig();
  include_once($config['root_path'].'/modules/Parser/lib/class.Engine.php');
  echo Engine::initInstance()->process($text);
?> 

or in your Smarty templates :

{$untrustedText|markdown}

There is also more options available :

<?php 
  $config = cmsms()->GetConfig();
  include_once($config['root_path'].'/modules/Parser/lib/class.Engine.php');
  echo Engine::initInstance(Engine::$PARSDOWN)->process($text, true); 
  // will use PARSDOWN and will produce some debug trace.
?> 

We propose 3 differents engine for MarkDown :

Thank you erusev and michelf for your work.