PHPackages                             nanoblocktech/markdown - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nanoblocktech/markdown

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nanoblocktech/markdown
======================

PHP parsedown plugin to allow video and table of content.

1.6.5(2mo ago)137MITPHPPHP ^8.0

Since Feb 9Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/nanoblocktech/markdown)[ Packagist](https://packagist.org/packages/nanoblocktech/markdown)[ RSS](/packages/nanoblocktech-markdown/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (10)Dependencies (2)Versions (12)Used By (0)

PHP Markdown Extension
======================

[](#php-markdown-extension)

[![PHP Version](https://camo.githubusercontent.com/2f6f9af2e917cbf5786673e8e4ed8d0d9b29be6131327a992063e69136a93411/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e302532422d626c7565)](https://www.php.net/)[![Composer](https://camo.githubusercontent.com/59fb2d63671be228673764aa6ae23524de22e39141289b22177ad3c56a9b7069/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f6d706f7365722d52657175697265642d627269676874677265656e)](https://getcomposer.org/)[![License](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)](LICENSE)

A lightweight PHP extension of [`Parsedown`](https://github.com/erusev/parsedown) that adds:

- Audio and video embedding using markdown syntax
- Automatic Table of Contents generation
- Responsive HTML tables
- External links automatically open in a new tab when the hostname differs

---

Installation
------------

[](#installation)

Installation via composer.

```
composer require nanoblocktech/markdown
```

---

Quick Start
-----------

[](#quick-start)

```
use Luminova\ExtraUtils\HtmlDocuments\Markdown;

$markdown = new Markdown();

echo $markdown->text('### Hello World');
```

---

Media Embedding
---------------

[](#media-embedding)

Embedding audio and videos in markdown.

### Audio

[](#audio)

```
{Description}(audio)(/path/to/audio.opus)
```

### Video

[](#video)

```
{Description}(video)(/path/to/video.mp4)
```

> Supports both local and remote URLs.

---

Configuration
-------------

[](#configuration)

### Enable Features

[](#enable-features)

```
// Generate table of contents
$markdown->tableOfContents(true);

// Make HTML tables responsive
$markdown->responsiveTable(true);
```

---

### Table of Contents Options

[](#table-of-contents-options)

```
// Include specific heading levels
$markdown->setHeadings(['h1', 'h2']);

// Prefix for generated heading IDs
$markdown->setIdPrefix('my-contents-');

// Retrieve generated table of contents
$tableOfContents = $markdown->getTableOfContents();
```

---

### Link Handling

[](#link-handling)

```
// Base URL for relative links
$markdown->setLink('https://example.com/assets/');
```

---

### Media Types

[](#media-types)

```
$markdown->setMediaType('audio', 'audio/ogg; codecs=opus');
$markdown->setMediaType('video', 'video/mp4');
```

---

Rendering Markdown
------------------

[](#rendering-markdown)

```
echo $markdown->text($content);
```

---

Full Example
------------

[](#full-example)

```
$markdown = new Markdown();
$markdown->tableOfContents(true);
$markdown->responsiveTable(true);
$markdown->setHeadings(['h1', 'h2']);
$markdown->setIdPrefix('toc-');
$markdown->setLink('https://example.com/assets/');
$markdown->setMediaType('audio', 'audio/ogg; codecs=opus');
$markdown->setMediaType('video', 'video/mp4');

$mdText =
> - External links automatically receive `target="_blank"` when the host differs from your application domain.
> - Media embedding works with local paths or remote URLs.
> - Table of contents is generated from configured heading levels only.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance85

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~79 days

Recently: every ~130 days

Total

11

Last Release

77d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ce34af529a4ed50696211a2b4d330fbadd2d1738bc5d010523eb4a85cf342b17?d=identicon)[peterujah](/maintainers/peterujah)

---

Top Contributors

[![peterujah](https://avatars.githubusercontent.com/u/16369609?v=4)](https://github.com/peterujah "peterujah (36 commits)")

---

Tags

phpparsedownluminovahtml markdown

### Embed Badge

![Health badge](/badges/nanoblocktech-markdown/health.svg)

```
[![Health](https://phpackages.com/badges/nanoblocktech-markdown/health.svg)](https://phpackages.com/packages/nanoblocktech-markdown)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
