PHPackages                             storyblok/richtext-resolver - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. storyblok/richtext-resolver

Abandoned → [storyblok/php-tiptap-extension](/?search=storyblok%2Fphp-tiptap-extension)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

storyblok/richtext-resolver
===========================

A package allowing you to get an HTML string from the richtext field of Storyblok.

2.2.1(2y ago)7587.6k↑18.3%7[1 PRs](https://github.com/storyblok/storyblok-php-richtext-renderer/pulls)5MITPHPPHP &gt;=7.3.0CI failing

Since May 7Pushed 1y ago15 watchersCompare

[ Source](https://github.com/storyblok/storyblok-php-richtext-renderer)[ Packagist](https://packagist.org/packages/storyblok/richtext-resolver)[ RSS](/packages/storyblok-richtext-resolver/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (2)Versions (14)Used By (5)

Warning

This package is discontinued and will only receive critical security updates.
Please use the new official [Tiptap Extension](https://github.com/storyblok/php-tiptap-extension).

Storyblok PHP Richtext Renderer - Deprecated
============================================

[](#storyblok-php-richtext-renderer---deprecated)

This package allows you to get an HTML string from the [richtext field](https://www.storyblok.com/docs/richtext-field) of Storyblok.

Installing the Storyblok PHP Richtext Renderer
----------------------------------------------

[](#installing-the-storyblok-php-richtext-renderer)

You can install the Storyblok PHP Richtext Renderer via composer. Storyblok PHP Richtext Renderer requires PHP version 7.3 to 8.2. The suggestion is to use an actively supported version of PHP (8.1 and 8.2).

If you want to install the stable release of Storyblok PHP Richtext Renderer you can launch:

```
composer require storyblok/richtext-resolver
```

If you want to install the current development release, you can add the version `dev-master`:

```
composer require storyblok/richtext-resolver dev-master
```

For executing the command above, you need to have composer installed on your development environment. If you need to install Composer, you can follow the official Composer documentation:

- Install Composer on [GNU Linux / Unix / macOS](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos)
- Install Composer on [Windows](https://getcomposer.org/doc/00-intro.md#installation-windows)

We suggest using the latest version of PHP.

```
composer require storyblok/richtext-resolver dev-master
```

Usage:
------

[](#usage)

Instantiate the `Resolver` class:

```
use Storyblok\RichtextRender\Resolver;

$resolver = new Resolver();
```

Use the function `render()` to get the html string from your richtext field.

```
// previous code...

// Note that in php our objects use multidimensional array notation
$data = [
  "type" => "doc",
  "content" => [
    [
      "type" => "horizontal_rule"
    ]
  ]
];

$resolver->render($data) # renders a html string: ''
```

### How to define a custom schema for resolver?

[](#how-to-define-a-custom-schema-for-resolver)

Make a copy of the default schema [storyblok-php-richtext-renderer/src/Schema.php](https://github.com/storyblok/storyblok-php-richtext-renderer/blob/master/src/Schema.php) and add your own schema as parameter to the Richtext class.

```
$resolver = new Resolver($my_custom_schema);
```

Testing
-------

[](#testing)

We use PHPUnit for tests. You can execute the following composer task to run the tests:

```
composer run test
```

If you want to generate the coverage report you can launch:

```
composer run test-coverage
```

You will find the HTML reports in the `coverage/` directory.

Code Style guide
----------------

[](#code-style-guide)

For consistency, we are using [PHP Coding Standards Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) tool, for checking and fixing the code to follow standards.

For checking the code you can execute:

```
composer run codestyle-check

```

If you want to automatically fix the code to follow standards:

```
composer run codestyle-fix

```

If you want to execute fix and test coverage:

```
composer run all-check

```

Contribution
------------

[](#contribution)

Fork me on [Github](https://github.com/storyblok/storyblok-php-richtext-renderer)

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity45

Moderate usage in the ecosystem

Community28

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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.

###  Release Activity

Cadence

Every ~279 days

Total

5

Last Release

1015d ago

Major Versions

1.0.0 → 2.0.02022-05-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/5502146a107d9e193823fac44e6fb4ef7a8f89d1e36726e8d42211e27833887f?d=identicon)[delooks](/maintainers/delooks)

---

Top Contributors

[![ademarCardoso](https://avatars.githubusercontent.com/u/40925579?v=4)](https://github.com/ademarCardoso "ademarCardoso (27 commits)")[![uuf6429](https://avatars.githubusercontent.com/u/230049?v=4)](https://github.com/uuf6429 "uuf6429 (13 commits)")[![roberto-butti](https://avatars.githubusercontent.com/u/678434?v=4)](https://github.com/roberto-butti "roberto-butti (12 commits)")[![emanuelgsouza](https://avatars.githubusercontent.com/u/20342656?v=4)](https://github.com/emanuelgsouza "emanuelgsouza (5 commits)")[![onefriendaday](https://avatars.githubusercontent.com/u/160495?v=4)](https://github.com/onefriendaday "onefriendaday (5 commits)")[![joaokamun](https://avatars.githubusercontent.com/u/7095828?v=4)](https://github.com/joaokamun "joaokamun (4 commits)")[![edodusi](https://avatars.githubusercontent.com/u/2177962?v=4)](https://github.com/edodusi "edodusi (2 commits)")[![pscheit](https://avatars.githubusercontent.com/u/488189?v=4)](https://github.com/pscheit "pscheit (1 commits)")[![christianzoppi](https://avatars.githubusercontent.com/u/20650272?v=4)](https://github.com/christianzoppi "christianzoppi (1 commits)")

---

Tags

htmlphprichtextstoryblokstoryblok-api-squadhtmltextrenderrichtextstoryblok

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/storyblok-richtext-resolver/health.svg)

```
[![Health](https://phpackages.com/badges/storyblok-richtext-resolver/health.svg)](https://phpackages.com/packages/storyblok-richtext-resolver)
```

###  Alternatives

[ckeditor/ckeditor

JavaScript WYSIWYG web text editor.

5234.2M76](/packages/ckeditor-ckeditor)[tinymce/tinymce

Web based JavaScript HTML WYSIWYG editor control.

1697.5M106](/packages/tinymce-tinymce)[froala/wysiwyg-editor

A beautiful jQuery WYSIWYG HTML rich text editor. High performance and modern design make it easy to use for developers and loved by users.

5.4k306.9k3](/packages/froala-wysiwyg-editor)[unisharp/laravel-ckeditor

JavaScript WYSIWYG web text editor (for laravel).

377762.3k5](/packages/unisharp-laravel-ckeditor)[w8tcha/ckeditor-wordcount-plugin

WordCount Plugin for CKEditor Editor

77470.2k](/packages/w8tcha-ckeditor-wordcount-plugin)[froala/yii2-froala-editor

A beautiful WYSIWYG HTML text editor based on HTML5 technology. Cross browser, with mobile support, high performance and Retina Ready modern design.

109229.5k6](/packages/froala-yii2-froala-editor)

PHPackages © 2026

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