Markdownify for FuelPHP
"Markdown" is two things: a plain text markup syntax, and a software tool that converts the plain text to HTML for publishing on the web.
This package converts HTML markup to Markdown syntax. This allows for a more natural editing experience for content that may have been converted to HTML by a WYSIWYG (What You See Is What You Get) editor
You can find the original markdown documentation here.
The markdown vendor package is used by FuelPHP in the Markdownify class, to convert from HTML to Markdown syntax.
You can access markdown through the Markdownify::parse() method.
A plain text to HTML converter, originally by John Gruber.
Parses HTML and returns Markdown.
$string = '<h1>About Markdown</h1> <p>Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid HTML.</p> <ul> <li>It features bullet points</li> <li>As well as other handy features</li> </ul>'; echo Markdown::parse($string);
# About Markdown
Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid HTML.
- It features bullet points
As well as other handy features
Starting with version 2.0.0 this is a complete rewrite and cannot be
compared to Aaron Swatz'
html2text.py anylonger. I'm now using a HTML parser
parsehtml.php which I also wrote) which makes most of the evil
RegEx magic go away and additionally it gives a much cleaner class structure. Also notably is the fact that I now try to prevent regressions by utilizing testcases of Michel Fortin's MDTest.