PHPackages                             develate/commonmark-customtags - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. develate/commonmark-customtags

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

develate/commonmark-customtags
==============================

A commonmark extension for custom tags

1.1(3w ago)15MITPHPPHP ^8.0

Since May 14Pushed 3w agoCompare

[ Source](https://github.com/develate/commonmark-customtags)[ Packagist](https://packagist.org/packages/develate/commonmark-customtags)[ Docs](https://github.com/develate/commonmark-customtags)[ RSS](/packages/develate-commonmark-customtags/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

commonmark-customtags
=====================

[](#commonmark-customtags)

A [league/commonmark](https://commonmark.thephpleague.com/) v2 extension for inline custom tags such as:

```
Hello {{badge text="Ready now" tone=success}}
```

The extension parses the content between the delimiters, uses the first token as a tag identifier, supports quoted argument values, URL-decodes the remaining arguments, and delegates rendering to your own `Customtag` classes.

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

[](#installation)

```
composer require develate/commonmark-customtags
```

Requirements:

- PHP 8.0 or newer
- `league/commonmark` 2.x

Basic Usage
-----------

[](#basic-usage)

Register the extension on a CommonMark environment and add one or more tags:

```
