PHPackages                             ueberdosis/prosemirror-php - 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. ueberdosis/prosemirror-php

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

ueberdosis/prosemirror-php
==========================

Work with ProseMirror JSON in PHP.

0.3.0(5y ago)1469.6k—8.5%5MITPHPPHP ^7.1.3|^8.0

Since Aug 26Pushed 4y ago1 watchersCompare

[ Source](https://github.com/ueberdosis/prosemirror-php)[ Packagist](https://packagist.org/packages/ueberdosis/prosemirror-php)[ GitHub Sponsors](https://github.com/sponsors/ueberdosis/)[ RSS](/packages/ueberdosis-prosemirror-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (5)Used By (0)

> 🚨 We’ve done a rewrite that you probably want to check out: [ueberdosis/tiptap-php](https://github.com/ueberdosis/tiptap-php)

ProseMirror PHP
===============

[](#prosemirror-php)

This package enables you to work with ProseMirror JSON in PHP. Convert it to HTML, or convert HTML to ProseMirror compatible JSON.

[![Latest Version on Packagist](https://camo.githubusercontent.com/dfb925e8b443586fa5e01b1740da6d3e8ebfe31aec6409c733537e0a43d4b4c1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7565626572646f7369732f70726f73656d6972726f722d7068702e737667)](https://packagist.org/packages/ueberdosis/prosemirror-php)[![Integrate](https://github.com/ueberdosis/prosemirror-php/workflows/Integrate/badge.svg?branch=main)](https://github.com/ueberdosis/prosemirror-php/actions)[![Total Downloads](https://camo.githubusercontent.com/a1de22d0687dd7f374882a2320213f910fbfc1359370e007a0173896720b4d02/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7565626572646f7369732f70726f73656d6972726f722d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ueberdosis/prosemirror-php)[![Sponsor](https://camo.githubusercontent.com/ee73cad5907779cdf16e865239ea623ca0bd44ccd5ad44fa7bfe7a5ac3ced298/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d53706f6e736f72266d6573736167653d254532253944254134266c6f676f3d476974487562)](https://github.com/sponsors/ueberdosis)

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

[](#installation)

```
composer require ueberdosis/prosemirror-php
```

Usage
-----

[](#usage)

Convert HTML to ProseMirror JSON:

```
(new \ProseMirror\ProseMirror)->html('Example Text')->toJson();
```

or

```
\ProseMirror\ProseMirror::htmlToJson('Example Text');
```

Output:

```
{
    "type": "doc",
    "content": [
        {
            "type": "paragraph",
            "content": [
                {
                    "type": "text",
                    "text": "Example Text"
                }
            ]
        }
    ]
}
```

Convert ProseMirror JSON to HTML:

```
(new \ProseMirror\ProseMirror)->json([
    'type' => 'doc',
    'content' => [
        [
            'type' => 'paragraph',
            'content' => [
                [
                    'type' => 'text',
                    'text' => 'Example Text',
                ],
            ],
        ],
    ],
])->toHtml();
```

or

```
\ProseMirror\ProseMirror::jsonToHtml([
    'type' => 'doc',
    'content' => [
        [
            'type' => 'paragraph',
            'content' => [
                [
                    'type' => 'text',
                    'text' => 'Example Text',
                ],
            ],
        ],
    ],
]);
```

Output:

```
Example Text
```

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

[](#contributing)

Pull Requests are welcome.

Credits
-------

[](#credits)

- [Hans Pagel](https://github.com/hanspagel)
- [Markus Machatschek](https://github.com/mmachatschek)
- [All Contributors](../../contributors)

Related Packages
----------------

[](#related-packages)

- [ueberdosis/html-to-prosemirror](https://github.com/ueberdosis/html-to-prosemirror)
- [ueberdosis/prosemirror-to-html](https://github.com/ueberdosis/prosemirror-to-html)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community15

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

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

###  Release Activity

Cadence

Every ~35 days

Total

4

Last Release

1986d ago

PHP version history (2 changes)0.1.0PHP ^7.1.3

0.3.0PHP ^7.1.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/3670ca0ea5e329d23070e3707db7bab7ab788a31fa16678507c0c14b858bcff5?d=identicon)[patrickbaber](/maintainers/patrickbaber)

![](https://www.gravatar.com/avatar/98f238189eab12ef0f354c0d9ec61f6c7f7c7e75564e3b3b0c79fed22396888b?d=identicon)[timoisik](/maintainers/timoisik)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (29 commits)")[![hanspagel](https://avatars.githubusercontent.com/u/1577992?v=4)](https://github.com/hanspagel "hanspagel (21 commits)")[![mmachatschek](https://avatars.githubusercontent.com/u/10237069?v=4)](https://github.com/mmachatschek "mmachatschek (4 commits)")[![marclaporte](https://avatars.githubusercontent.com/u/1004261?v=4)](https://github.com/marclaporte "marclaporte (1 commits)")

---

Tags

htmljsonphpprosemirrorprosemirror

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/ueberdosis-prosemirror-php/health.svg)

```
[![Health](https://phpackages.com/badges/ueberdosis-prosemirror-php/health.svg)](https://phpackages.com/packages/ueberdosis-prosemirror-php)
```

###  Alternatives

[verbb/vizy

A flexible visual editor field for Craft.

4348.6k](/packages/verbb-vizy)

PHPackages © 2026

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