PHPackages                             oberon/quill-rendering - 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. oberon/quill-rendering

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

oberon/quill-rendering
======================

Render 'insert' Delta's of a Quill Editor. Inspired by D. Blackborough's Quill Renderer package

v1.0.0(7y ago)016.2kMITPHPPHP &gt;=5.6.0

Since Sep 12Pushed 7y ago1 watchersCompare

[ Source](https://github.com/KellydeHaan/quill-render-php)[ Packagist](https://packagist.org/packages/oberon/quill-rendering)[ RSS](/packages/oberon-quill-rendering/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

### Installation

[](#installation)

Use composer

`composer require oberon/quill-rendering`

### Usage

[](#usage)

```
$quillOps = "{\"ops\":[
    {\"insert\":\"Lorem ipsum dolor sit amet, \"},
    {\"insert\":\" consectetur\",\"attributes\":{\"bold\":true}},
    {\"insert\":\" adipiscing elit. Sed volutpat lectus non \"},
    {\"insert\":\"pellentesque volutpat\",\"attributes\":{\"italic\":true}},
    {\"insert\":\". Phasellus in lectus pulvinar lorem vestibulum pellentesque.\"}
]}";

try {
    $quill = new RenderQuill();
    $quill->setParsers(\Oberon\Quill\Render\Html\DefaultHtmlParsers::get());
    $quill->load($quillOps);
    echo $quill->render(true);
} catch (Exception $e) {
    echo $e->getMessage();
}

```

Output should be:

Lorem ipsum dolor sit amet,  **consectetur** adipiscing elit. Sed volutpat lectus non *pellentesque volutpat*. Phasellus in lectus pulvinar lorem vestibulum pellentesque.

### Most important components

[](#most-important-components)

- **Renderer**

    Has function `render` which returns a string with formatted contents
- **Parser**

    When given a Quill `op` and `renderers[]` return `true` if `op` was handled and an appropriate `Renderer` was added to provided `renderers[]`, `false` otherwise

### Convenient classes/methods

[](#convenient-classesmethods)

`DefaultHtmlParsers::get()` returns a `Parser[]` for most basic HTML functionality including

- Bold
- Underline
- Strikethrough
- Italic
- Ordered/Unordered lists
- Links
- Images
- Headers
- Sub/SuperScript

`HtmlParser::withQuill($quillOps)` will render the provided Quill-text with the DefaultHtmlParsers.

### Adding a custom Parser and Renderer

[](#adding-a-custom-parser-and-renderer)

Example: You want to use `` instead of `` for bold.

1. Create a Renderer

```
class Bold implements Renderer {

	private $text;

	public function __construct($insert) {
		$this->text = $insert;
	}

	public function render() {
		return ''.$this->text.'';
	}
}

```

2. Create a Parser

```
class BoldParser implements Parser {

	public function handleOp(array $op, array & $renderers) {

		//Check if your parser is going to handle the op
		if (array_key_exists('attributes', $op)
			&& is_array($op['attributes'])
			&& is_string($op['insert'])
			&& array_key_exists(Attribute::BOLD, $op['attributes'])) {

			//Instantiate your Bold Renderer
			$boldRenderer = new Bold($op['insert']);

			//It is inline, so add it to a Paragraph-block. The InlineUtil can do that
			InlineUtil::addToParagraph($boldRenderer, $renderers);

			return true;
		} else {
			// If your parser does not handle the op return false;
			return false;
		}
	}
}

```

3. Register the Parser with the RenderQuill

```
//Start with the other HTML parsers
$parsers = DefaultHtmlParsers::get();

//Add to the beginning of the array,
//so it is checked before BasicHtmlParser which would also handle the bold attribute
$parsers = array_unshift($parsers, new BoldParser());

$quill = new RenderQuill();
//register
$quill->setParsers($parsers);

```

Note: This code is an example and needs modification if you would use it. For example: this does not handle cases where the `attributes` contain `bold` and some other attribute.

### Notes

[](#notes)

The `load` method immediately uses the provided `Parsers`, so Parsers should be set first.

Other Ops than insert exist: those will not be rendered. Use the Quill-Delta library at

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2841d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7426848?v=4)[jurriaanr](/maintainers/jurriaanr)[@jurriaanr](https://github.com/jurriaanr)

![](https://avatars.githubusercontent.com/u/18033603?v=4)[KellydeHaan](/maintainers/KellydeHaan)[@KellydeHaan](https://github.com/KellydeHaan)

---

Top Contributors

[![KellydeHaan](https://avatars.githubusercontent.com/u/18033603?v=4)](https://github.com/KellydeHaan "KellydeHaan (8 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/oberon-quill-rendering/health.svg)

```
[![Health](https://phpackages.com/badges/oberon-quill-rendering/health.svg)](https://phpackages.com/packages/oberon-quill-rendering)
```

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3861.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.0k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.2k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

291.8k](/packages/webkinder-sproutset)[awkwardideas/switchblade

Extended blade directives for laravel

102.1k](/packages/awkwardideas-switchblade)

PHPackages © 2026

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