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: 179 369

Dependents: 3

Suggesters: 0

Security: 0

Stars: 24

Watchers: 2

Forks: 1

Open Issues: 0

Type:commonmark-extension

2.0.0 2021-08-23 11:27 UTC

This package is auto-updated.

Last update: 2024-10-26 12:29:28 UTC


README

Latest Version Software License Build Status Codacy Grade Total Downloads

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:!');

Emoji list