Php library to render EditorJs to HTML.
You can install the library via Composer:
composer require wizbii/editor-js-to-html
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);
You can run the tests with PHPUnit:
composer test
For test coverage:
composer test-coverage
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
Sylvain DEPARTE - [email protected]
This project is licensed under the MIT License