Download the PHP package fastvolt/markdown without Composer
On this page you can find all versions of the php package fastvolt/markdown. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fastvolt/markdown
More information about fastvolt/markdown
Files in fastvolt/markdown
Package markdown
Short Description A Fast, Simple and Straight-forward Markdown to HTML Converter for PHP.
License MIT
Informations about the package markdown
Markdown Parser for PHP
A fast, simple, and straightforward Markdown to HTML converter for PHP.
đ Installation
đĻ Basic Usage
Output:
đ Convert Markdown File to Raw HTML
sample.md:
index.php:
Output:
đ Convert Markdown File to An HTML File
blogPost.md:
index.php:
đ Sanitizing HTML Output (XSS Protection)
You can sanitize input HTML and prevent cross-site scripting (XSS) attack using the sanitize
flag:
Output:
âī¸ Advanced Use Case
Inline Markdown
Output:
NOTE: Some markdown symbols are not supported with this method
Example #1
Combine multiple markdown files, contents and compile them in multiple directories:
Header.md
Footer.md
index.php
Output:
pages/homepage.html
,backup/pages/homepage.html
Supported Formatting Symbols
Markdown Syntax | Description | Example Syntax | Rendered Output |
---|---|---|---|
# to ###### |
Headings (H1âH6) | ## Heading 2 |
Heading 2 |
**text** or __text__ |
Bold | **bold** |
bold |
*text* or _text_ |
Italic | *italic* |
italic |
~~text~~ |
Strikethrough | ~~strike~~ |
|
`code` | Inline code | `echo` |
echo |
||
|
Code block | | ` |
|
- , + , or * |
Unordered list | - Item 1 * Item 2 |
<ul><li>Item</li></ul> |
1. 2. |
Ordered list | 1. Item 2. Item |
<ol><li>Item</li></ol> |
[text](url) |
Hyperlink | [GitHub](https://github.com) |
GitHub |
> blockquote |
Blockquote | > This is a quote |
This is a quote |
--- , *** , ___ |
Horizontal Rule | --- |
<hr> |
 |
Image |  |
<img src="logo.png" alt="Logo"> |
\ |
Escape special character | \*not italic\* |
not italic (as text) |
â Requirements
PHP 8.1 or newer.
âšī¸ Notes
This library is an extended and simplified version of the excellent Parsedown by Erusev.
đ License
This project is open-source and licensed under the MIT License by @fastvolt.
All versions of markdown with dependencies
ext-dom Version *
ext-json Version *
ext-libxml Version *
ext-mbstring Version *
ext-tokenizer Version *
ext-xml Version *
ext-xmlwriter Version *