PHPackages                             everyday/html-to-quill - 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. everyday/html-to-quill

ActiveLibrary

everyday/html-to-quill
======================

PHP HTML to Quill Delta converter

0.4.0(4y ago)725.8k—0%5[3 issues](https://github.com/everyday-as/html-to-quill/issues)[1 PRs](https://github.com/everyday-as/html-to-quill/pulls)1Apache-2.0PHPPHP &gt;=8.0

Since May 17Pushed 2y ago3 watchersCompare

[ Source](https://github.com/everyday-as/html-to-quill)[ Packagist](https://packagist.org/packages/everyday/html-to-quill)[ Docs](https://github.com/Everyday-AS/html-to-quill)[ RSS](/packages/everyday-html-to-quill/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (2)Versions (6)Used By (1)

html-to-quill
=============

[](#html-to-quill)

html-to-quill is a PHP library for converting an HTML string to Quill deltas.

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

[](#installation)

html-to-quill can be installed through Composer.

```
$ composer require everyday/html-to-quill
```

Basic Usage
-----------

[](#basic-usage)

The `HtmlConverter` class provides a simple interface for converting from HTML to Quill Deltas:

```
use Everyday\HtmlToQuill\HtmlConverter;

$converter = new HtmlConverter();
echo json_encode($converter->convert("Hello World!"));

// {"ops":[{"insert":"Hello World!"},{"insert":"\n","attributes":{"header":1}}]}
```

Supporting Custom Tag Behaviour
-------------------------------

[](#supporting-custom-tag-behaviour)

Custom tags can be supported through customer converters. Converters take a DOMNode as an input, and return a DeltaOp. The default converters can be found in src/Converters

Custom converters can be implemented to handle additional behaviour, which are then implemented into an extension of the HtmlConverter.

### Example: Parsing &lt;style&gt; tags as code blocks.

[](#example-parsing-style-tags-as-code-blocks)

To enable parsing style tags, two converters are required. One for the &lt;style&gt; tag itself, and one for the #cdata-section which represents the internal data.

For this example, namespaces will be omitted.

```
class StyleConverter extends CodeConverter {
	public function getSupportedTags(): array {
		return ['style'];
	}
}
```

```
class CDataConverter extends TextConverter {
	public function getSupportedTags(): array {
		return ['#cdata-section'];
	}
}
```

```
class StyleCodeBlockEnabledHtmlConverter extends HtmlConverter {
	public function __construct(){
		parent::__construct(); // We want our default converters.
		$this->converters[] = new StyleConverter();
		$this->converters[] = new CDataConverter();
	}
}
```

These classes combine in the same style as the basic usage example, to produce our usable output:

```
$converter = new StyleCodeBlockEnabledHtmlConverter();
echo json_encode($converter->convert(".warning {background-color: red;}"));

// {"ops":[{"insert":".warning {background-color: red;}","attributes":{"code":true}},{"insert":"\n"}]}
```

###  Health Score

32

—

LowBetter than 74% of packages

Maintenance11

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity54

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 ~161 days

Total

5

Last Release

1487d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b1a9a39f540b62d115b157a36eb3ebeb32274e5f287df35a4a19e873bf09385?d=identicon)[J0sh0nat0r](/maintainers/J0sh0nat0r)

---

Top Contributors

[![Marcuzz](https://avatars.githubusercontent.com/u/3168421?v=4)](https://github.com/Marcuzz "Marcuzz (8 commits)")[![JoshPiper](https://avatars.githubusercontent.com/u/32164094?v=4)](https://github.com/JoshPiper "JoshPiper (6 commits)")[![J0sh0nat0r](https://avatars.githubusercontent.com/u/16763483?v=4)](https://github.com/J0sh0nat0r "J0sh0nat0r (3 commits)")[![stepanorda](https://avatars.githubusercontent.com/u/6368917?v=4)](https://github.com/stepanorda "stepanorda (2 commits)")

---

Tags

converthtmldeltaquill

### Embed Badge

![Health badge](/badges/everyday-html-to-quill/health.svg)

```
[![Health](https://phpackages.com/badges/everyday-html-to-quill/health.svg)](https://phpackages.com/packages/everyday-html-to-quill)
```

###  Alternatives

[nadar/quill-delta-parser

A PHP library to parse Quill WYSIWYG editor deltas into HTML - flexible and extendible for custom elements.

131715.2k5](/packages/nadar-quill-delta-parser)[gotenberg/gotenberg-php

A PHP client for interacting with Gotenberg, a developer-friendly API for converting numerous document formats into PDF files, and more!

3674.8M15](/packages/gotenberg-gotenberg-php)[wa72/htmlpagedom

jQuery-inspired DOM manipulation extension for Symfony's Crawler

3533.9M32](/packages/wa72-htmlpagedom)[pdfcrowd/pdfcrowd

A client library for the Pdfcrowd API. It lets you convert between HTML, PDF and various image formats

631.1M1](/packages/pdfcrowd-pdfcrowd)[aspose-cloud/aspose-words-cloud

Open, generate, edit, split, merge, compare and convert Word documents. Integrate Cloud API into your solutions to manipulate documents. Convert PDF to Word (DOC, DOCX, ODT, RTF and HTML) and in the opposite direction.

32147.4k](/packages/aspose-cloud-aspose-words-cloud)[eve/pdf-converter

Laravel package to convert HTML to PDF, supporting multiple drivers.

114.1k](/packages/eve-pdf-converter)

PHPackages © 2026

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