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.
This project can be installed via [Composer]:
$ composer require everyday/commonquill
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}}]}
Please refer to thephpleague/commonmark's docs for more information.