Usage is so simple, include the file containing the base code, and just define a a markdown parser.
$text = '# Header
### sub header
## Complaint 1.
---
I am a **strong** text.
';
$markdown = new magictr\Markdown(["outWrapper" => true]);
echo $markdown->parse($text);
Type: boolean
Default: true
Enable [GitHub flavored markdown][gfm].
Type: boolean
Default: true
Enable GFM [tables][tables].
This option requires the gfm
option to be true.
Type: boolean
Default: false
Enable GFM [line breaks][breaks].
This option requires the gfm
option to be true.
Type: boolean
Default: false
Conform to obscure parts of markdown.pl
as much as possible. Don't fix any of
the original markdown bugs or poor behavior.
Type: boolean
Default: false
Sanitize the output. Ignore any HTML that has been input.
Type: boolean
Default: true
Use smarter list behavior than the original markdown. May eventually be
default with the old behavior moved into pedantic
.
Type: boolean
Default: false
Use "smart" typograhic punctuation for things like quotes and dashes.
Type: boolean
Default: false
Parse Html tags
Type: boolean
Default: false
shadow the result to another html root.
Type: instance
=> contains the function highlight
, takes args (lang xml, php, ..etc, code)
Default: null
highlights codes
Type: boolean
Default: false
Allows the usage of emotions
Type: string
Default:
append that class to emotions. Only works if emotions is enabled
Type: string
Default:
where emotions' images are added. Only works if emotions is enabled
Type: list
Default: []
a list of available emotions