PHPackages                             davidgorges/editorjs-twig-renderer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. davidgorges/editorjs-twig-renderer

ActiveLibrary[Templating &amp; Views](/categories/templating)

davidgorges/editorjs-twig-renderer
==================================

Render EditorJS output via Twig

0266[2 PRs](https://github.com/davidgorges/editorjs-twig-renderer/pulls)HTMLCI passing

Since Feb 14Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/davidgorges/editorjs-twig-renderer)[ Packagist](https://packagist.org/packages/davidgorges/editorjs-twig-renderer)[ RSS](/packages/davidgorges-editorjs-twig-renderer/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (4)Used By (0)

davidgorges/editorjs-twig-renderer
==================================

[](#davidgorgeseditorjs-twig-renderer)

 **Render EditorJS output via Twig**

Work in Progress
----------------

[](#work-in-progress)

This library is currently in **work in progress** and not ready for use.

Installation
------------

[](#installation)

Install this package as a dependency using [Composer](https://getcomposer.org).

```
composer require davidgorges/editorjs-twig-renderer
```

Usage
-----

[](#usage)

```
use EditorJs\Parser;

$json = '{
    "blocks": [
        {
            "type": "header",
            "data": {
                "text": "Hello World",
                "level": 1
            }
        }
    ]
}';

$twigRenderer = new TwigRenderer('/path-to/editorjs.html.twig');
$parser = new Parser($twigRenderer);
$html = $parser->parse($json);

echo $html;
// Output: Hello World
```

### Customize

[](#customize)

You can provider your own Twig template to render the output.

```
{% block header %}
{{ text }}
{% endblock %}
```

See `tests/data/editorjs.html.twig` for more examples of how to customize the output.

Contributing
------------

[](#contributing)

Contributions are welcome! To contribute, please familiarize yourself with [CONTRIBUTING.md](CONTRIBUTING.md).

Copyright and License
---------------------

[](#copyright-and-license)

The davidgorges/editorjs-twig-renderer library is copyright © [David Gorges](https://www.dekkode.com)and licensed for use under the terms of the MIT License (MIT). Please see [LICENSE](LICENSE) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance64

Regular maintenance activity

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

Top contributor holds 85.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6abaff8e3d8d647d1cd8d3479bb3793b16a66ee24877d195e697a646439730ba?d=identicon)[dgorges](/maintainers/dgorges)

---

Top Contributors

[![davidgorges](https://avatars.githubusercontent.com/u/3885619?v=4)](https://github.com/davidgorges "davidgorges (6 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

### Embed Badge

![Health badge](/badges/davidgorges-editorjs-twig-renderer/health.svg)

```
[![Health](https://phpackages.com/badges/davidgorges-editorjs-twig-renderer/health.svg)](https://phpackages.com/packages/davidgorges-editorjs-twig-renderer)
```

###  Alternatives

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[symfony/ux-icons

Renders local and remote SVG icons in your Twig templates.

545.8M69](/packages/symfony-ux-icons)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
