storyblok/richtext-resolver
最新稳定版本:2.2.1
Composer 安装命令:
composer require storyblok/richtext-resolver
包简介
A package allowing you to get an HTML string from the richtext field of Storyblok.
关键字:
README 文档
README
Warning
This package is discontinued and will only receive critical security updates.
Please use the new official Tiptap Extension.
Storyblok PHP Richtext Renderer - Deprecated
This package allows you to get an HTML string from the richtext field of Storyblok.
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
- Install Composer on Windows
We suggest using the latest version of PHP.
composer require storyblok/richtext-resolver dev-master
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: '<hr />'
How to define a custom schema for resolver?
Make a copy of the default schema storyblok-php-richtext-renderer/src/Schema.php and add your own schema as parameter to the Richtext class.
$resolver = new Resolver($my_custom_schema);
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
For consistency, we are using PHP Coding Standards 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
Fork me on Github
storyblok/richtext-resolver 适用场景与选型建议
storyblok/richtext-resolver 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 537.69k 次下载、GitHub Stars 达 7, 最近一次更新时间为 2026 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「text」 「html」 「render」 「richtext」 「storyblok」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 storyblok/richtext-resolver 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 storyblok/richtext-resolver 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 storyblok/richtext-resolver 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Texy converts plain text in easy to read Texy syntax into structurally valid (X)HTML. It supports adding of images, links, nested lists, tables and has full support for CSS. Texy supports hyphenation of long words (which reflects language rules), clickable emails and URL (emails are obfuscated again
Common libraries used by Zimbra Api
HTML and form generation
Render small SVG icons to monochrome ANSI for terminal UIs (Laravel/Prompts, Symfony Console, plain CLI).
Common Render Api Interface
A modern HTML DOM parser for PHP using DOMDocument and Symfony CssSelector.
统计信息
- 总下载量: 537.69k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 32
- 依赖项目数: 6
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-04