everyday/commonquill

There is no license information available for the latest version (0.1.5) of this package.

PHP Markdown to Quill Delta parser based on the CommonMark spec

0.1.5 2022-02-23 19:14 UTC

This package is auto-updated.

Last update: 2024-04-23 23:42:00 UTC


README

Tests StyleCI codecov

everyday/commonquill is a PHP-based Markdown to Quill parser created by Everyday which supports the full [CommonMark] spec. everyday/commonquill depends on league/commonmark's brilliant AST implementation.

Installation

This project can be installed via [Composer]:

$ composer require everyday/commonquill

Basic Usage

The QuillConverter class provides a simple wrapper for converting CommonMark to Quill Deltas:

use Everyday\CommonQuill\QuillConverter;

$converter = new QuillConverter();
echo json_encode($converter->convertToQuill('# Hello World!'));

// {"ops":[{"insert":"Hello World!"},{"insert":"\n","attributes":{"header":1}}]}

Advanced Usage & Customization

Please refer to thephpleague/commonmark's docs for more information.