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
Requires
- php: >=8.0
- ext-json: *
- everyday/html-to-quill: ^0.4
- everyday/php-quill-delta: ^0.1
- league/commonmark: ^2.2
- mikehaertl/php-shellcommand: ^1.4
- nikic/php-parser: ^4.13
Requires (Dev)
- pestphp/pest: ^1.21
- symfony/finder: ^6.0
README
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.