wizbii / editor-js-to-html
Php library to render EditorJs to HTML
v1.0.2
2025-02-06 14:27 UTC
Requires
- phpdocumentor/reflection-docblock: ^5.0
- symfony/property-access: ^6.4|^7.0
- symfony/serializer: ^6.4|^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.68
- marcocesarato/php-conventional-changelog: ^1.17
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.5
- rector/rector: ^2.0
This package is auto-updated.
Last update: 2025-03-06 14:41:03 UTC
README
Php library to render EditorJs to HTML.
Installation
You can install the library via Composer:
composer require wizbii/editor-js-to-html
Usage
use Wizbii\EditorJsToHtml\EditorJsToHtml; $editorJs = '{ "time": 1724416790049, "blocks": [ { "id": "I0aXLNrk3g", "type": "header", "data": { "text": "Question n°1", "level": 1 } }, { "id": "I0aXsL7VIq", "type": "paragraph", "data": { "text": "Veuillez indiquer votre date de naissance." } } ], "version": "2.29.1" }'; echo EditorJsHelper::renderEditorJsToHtml($editorJs);
Running the tests
You can run the tests with PHPUnit:
composer test
For test coverage:
composer test-coverage
Code quality
To check for code quality issues, you can use the following commands:
composer dev:cs
To automatically fix code style issues:
composer cs:fix composer rector:fix
Authors
Sylvain DEPARTE - sylvain.departe@wizbii.com
License
This project is licensed under the MIT License