{"id":13535674,"url":"https://github.com/deanblackborough/php-quill-renderer","last_synced_at":"2025-04-02T02:31:10.564Z","repository":{"id":46163158,"uuid":"82985188","full_name":"deanblackborough/php-quill-renderer","owner":"deanblackborough","description":"Render quill insert deltas to HTML, Markdown and GitHub flavoured Markdown (150k installs on Packagist)","archived":true,"fork":false,"pushed_at":"2022-11-06T12:16:07.000Z","size":532,"stargazers_count":116,"open_issues_count":0,"forks_count":25,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-13T00:42:43.431Z","etag":null,"topics":["deltas-renderer","html","markdown","mit-license","php-quill-renderer","php7","quill","renderer"],"latest_commit_sha":null,"homepage":"https://transmute-coffee.com/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deanblackborough.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["deanblackborough"]}},"created_at":"2017-02-24T00:34:40.000Z","updated_at":"2025-02-11T23:57:33.000Z","dependencies_parsed_at":"2023-01-22T02:33:09.083Z","dependency_job_id":null,"html_url":"https://github.com/deanblackborough/php-quill-renderer","commit_stats":null,"previous_names":[],"tags_count":53,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanblackborough%2Fphp-quill-renderer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanblackborough%2Fphp-quill-renderer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanblackborough%2Fphp-quill-renderer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanblackborough%2Fphp-quill-renderer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deanblackborough","download_url":"https://codeload.github.com/deanblackborough/php-quill-renderer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246743576,"owners_count":20826556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deltas-renderer","html","markdown","mit-license","php-quill-renderer","php7","quill","renderer"],"created_at":"2024-08-01T09:00:20.672Z","updated_at":"2025-04-02T02:31:10.198Z","avatar_url":"https://github.com/deanblackborough.png","language":"PHP","funding_links":["https://github.com/sponsors/deanblackborough"],"categories":["PHP","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"[![Latest Stable Version](https://img.shields.io/packagist/v/deanblackborough/php-quill-renderer.svg?style=flat-square)](https://packagist.org/packages/deanblackborough/php-quill-renderer)\n![Packagist](https://img.shields.io/packagist/dt/deanblackborough/php-quill-renderer.svg)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/deanblackborough/php-quill-renderer/blob/master/LICENSE)\n[![Minimum PHP Version](https://img.shields.io/badge/php-\u003e=7.4-8892BF.svg)](https://php.net/)\n[![Supported PHP Version](https://img.shields.io/badge/php-^8.0-8892BF.svg)](https://php.net/)\n[![Supported PHP Version](https://img.shields.io/badge/php-^8.1-8892BF.svg)](https://php.net/)\n[![Validate dependencies and run tests](https://github.com/deanblackborough/php-quill-renderer/actions/workflows/php.yml/badge.svg)](https://github.com/deanblackborough/php-quill-renderer/actions/workflows/php.yml)\n\n# PHP Quill Renderer\n\nRender quill insert deltas to HTML, Markdown and GitHub flavoured Markdown.\n\n## Read-only\nIt doesn't look like there will be new version of Quill, I've decided to make the repo read-only, I'm not going to dedicate anymore time to this package.\n\n## Description\n\n[Quill](https://github.com/quilljs/quill)  deltas renderer, converts deltas to HTML and Markdown, the [Quill](https://github.com/quilljs/quill) attributes \nsupported are listed in the table below, the goal is to eventually support every Quill feature.\n\n[Quill](https://github.com/quilljs/quill) is a modern WYSIWYG editor built for compatibility and extensibility.\n\n## Installation\n \nThe easiest way to use the `PHP Quill Renderer` is via composer. \n```composer require deanblackborough/php-quill-renderer```, \nalternatively you can include the classes in my src/ directory directly in your \nlibrary or app.\n\n## Usage\n\n### Via API, single $quill_json\n```php\ntry {\n    $quill = new \\DBlackborough\\Quill\\Render($quill_json);\n    $result = $quill-\u003erender();\n} catch (\\Exception $e) {\n    echo $e-\u003egetMessage();\n}\n\necho $result;\n```\n\n### Via API, multiple $quill_json, passed in via array\n\n```php\ntry {\n    $quill = new RenderMultiple($quill_json, 'HTML');\n    \n    $result_one = $quill-\u003erender('one');\n    $result_two = $quill-\u003erender('two');\n} catch (\\Exception $e) {\n    echo $e-\u003egetMessage();\n}\n\necho $result_one;\necho $result_two;\n```\n\n### Direct, parse and then render, single $quill_json - updated in v3.10.0\n\n```php\n$parser = new \\DBlackborough\\Quill\\Parser\\Html();\n$renderer = new \\DBlackborough\\Quill\\Renderer\\Html();\n\n$parser-\u003eload($quill_json)-\u003eparse();\n\necho $renderer-\u003eload($parser-\u003edeltas())-\u003erender();\n```\n\n### Direct, parse and then render, multiple $quill_json - updated in v3.10.0\n\n```php\n$parser = new \\DBlackborough\\Quill\\Parser\\Html();\n$renderer = new \\DBlackborough\\Quill\\Renderer\\Html();\n\n$parser-\u003eloadMultiple(['one'=\u003e $quill_json_1, 'two' =\u003e $quill_json_2)-\u003eparseMultiple();\n\necho $renderer-\u003eload($parser-\u003edeltasByIndex('one'))-\u003erender();\necho $renderer-\u003eload($parser-\u003edeltasByIndex('two'))-\u003erender();\n```\n\n## Quill attributes and text flow support\n\n| Attribute | v1+ | v2+ | v3 HTML | v3 Markdown\n| :---: | :---: | :---: | :---: | :---:\n| Bold | Yes | Yes | Yes | Yes\n| Italic | Yes | Yes | Yes | Yes\n| Link | Yes | Yes | Yes | Yes\n| Strike | Yes | Yes | Yes | N/A\n| Script:Sub | Yes | Yes | Yes | N/A\n| Script:Super | Yes | Yes | Yes | N/A\n| Underline | Yes | Yes | Yes | N/A\n| Header | Yes | Yes | Yes | Yes\n| Image | Yes | Yes | Yes | Yes\n| Video | No | No | Yes | Yes\n| List | Yes | Yes | Yes | Yes\n| Child lists | No | No | No | No\n| Indent/Outdent | No| No | No | No\n| Text direction | No | No | No | N/A\n| Color | No | No | No | N/K\n| Font | No | No | No | N/K\n| Text align | No | No | No | N/A\n| Block quote | No | No | No | No\n| Code block | No | No | No | No\n| Custom attributes | No | No | Yes | N/A\n| Line breaks | No | No | Yes | Yes\n| Paragraphs | Yes | Yes | Yes | Yes\n\n| Attribute | HTML Tag | Markdown Token\n| :---: | :---: | :---:\n| Bold | `\u003cstrong\u003e` | `**`\n| Italic | `\u003cem\u003e` | `*`\n| Link | `\u003ca\u003e` | `[Text](Link)`\n| Strike | `\u003cs\u003e` |\n| Script:Sub | `\u003csub\u003e` |\n| Script:Super | `\u003csup\u003e` |\n| Underline | `\u003cu\u003e` |\n| Header | `\u003ch[n]\u003e` | `#[n]`\n| Image | `\u003cimg\u003e` | `![Image](\\path\\to\\image)`\n| Video | `\u003ciframe\u003e` | `![Video](\\path\\to\\video)`\n| List | `\u003cul\u003e` `\u003col\u003e` | `* ` \u0026 `[n]`\n\n## Copyright and license\nThe [deanblackborough/php-quill-renderer](https://github.com/deanblackborough/php-quill-renderer) \nlibrary is copyright © Dean Blackborough and \n[licensed](https://github.com/deanblackborough/php-quill-renderer/blob/master/LICENSE) \nfor use under the MIT License (MIT). \n\n## Credits\n\n* [carlos](https://github.com/sald19) [Bugfix] v1.01.0.\n* [pdiveris](https://github.com/pdiveris) [Issue #43] - Null inserts.\n* [Mark Davison](https://github.com/markdavison) - Pushed me in the right direction for v3.00.0.\n* [tominventisbe](https://github.com/tominventisbe) [Issue #54] - Parser::load() does not reset the deltas array.\n* [tominventisbe](https://github.com/tominventisbe) [Issue #55] - Image deltas with multiple attributes incorrectly being passed to Compound delta.\n* [bcorcoran](https://github.com/bcorcoran) [Issue #81] - Suggested reverting requirements to necessary requirements.\n* [kingga](https://github.com/kingga) [Issue #86] - Video support.\n* [Jonathanm10](https://github.com/Jonathanm10) [Issue #87] - Newlines proceeding inserts ignored, bug report.\n* [raphaelsaunier](https://github.com/raphaelsaunier) [Issue #87] - Newlines proceeding inserts ignored, bug location.\n* [Basil](https://github.com/nadar) [Issue #101] - Newline only inserts being ignored by parser.\n* [Lee Hesselden](https://github.com/on2) [PR #104] - Color delta to allowing spans with a style:color=\"#xxx\" definition. (Feature will be extended by [Issue #106])\n* [Alex](https://github.com/AlexFence) [PR #112] - Custom attributes assigned to style attribute if sensible.\n* [davidraijmakers](https://github.com/davidraijmakers) [Issue #108] - Children not supported with headers.\n* [philippkuehn](https://github.com/philippkuehn) [Issue #109] - Multiple list output incorrect and paragraphs not being closed.\n* [mechanicalgux](https://github.com/mechanicalgux) [Issue #117] - Compound deltas don't know that they can be links.\n* [Lode Claassen](https://github.com/lode) [PR #121] - Missing supported format in exception messages.\n* [Lode Claassen](https://github.com/lode) [PR #122] - Validation code DRY.\n* [Lode Claassen](https://github.com/lode) [PR #123] - Allow already decoded json to be passed to parser.\n* [Nicholas Humphries](https://github.com/Humni) [PR #128] - Videos with attributes not supported.\n* [hybridvision](https://github.com/hybridvision) [Issue #132] - Issue rendering single item lists when they aren't the first content.\n\n## Coding standards and documentation credits\n\n* [Lode Claassen](https://github.com/lode) [PR #113] - Incorrect case in keyword. \n* [Theo W](https://github.com/Theo-W) - Readme documentation updates\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeanblackborough%2Fphp-quill-renderer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeanblackborough%2Fphp-quill-renderer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeanblackborough%2Fphp-quill-renderer/lists"}