elgigi / commonmark-emoji
CommonMark extension adds UTF-8 emoji with Github tag for the `league/commonmark` PHP Markdown parsing engine, based on the CommonMark spec.
Installs: 180 599
Dependents: 3
Suggesters: 0
Security: 0
Stars: 25
Watchers: 2
Forks: 1
Open Issues: 0
Type:commonmark-extension
Requires
- php: ^7.4 || ^8.0
- league/commonmark: ^2.0
Requires (Dev)
- phpunit/phpunit: ^9.5
README
This extension adds UTF-8 emoji with Github tag for the league/commonmark
PHP Markdown parsing engine, based on the CommonMark spec.
Installation
You can install the client with Composer:
composer require elgigi/commonmark-emoji
Version 2.x of the extension is designed for league/commonmark 2.x. Use version 1 for league/commonmark 1.x.
Usage
Extension can be added to any new Environment:
use League\CommonMark\CommonMarkConverter; use League\CommonMark\Environment; use ElGigi\CommonMarkEmoji\EmojiExtension; $converter = new CommonMarkConverter(); $converter->getEnvironment()->addExtension(new EmojiExtension()); echo $converter->convertToHtml('This extension is great :smile:!');