PHPackages                             ueberdosis/prosemirror-to-html - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. ueberdosis/prosemirror-to-html

AbandonedArchivedLibrary[Parsing &amp; Serialization](/categories/parsing)

ueberdosis/prosemirror-to-html
==============================

Takes HTML and outputs ProseMirror compatible JSON.

2.7.0(4y ago)771.7M↓27.6%21[2 issues](https://github.com/ueberdosis/prosemirror-to-html/issues)2MITPHPPHP ^7.1.3|^8.0

Since Jan 23Pushed 4y agoCompare

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

READMEChangelog (9)Dependencies (3)Versions (24)Used By (2)

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

ProseMirror to HTML
===================

[](#prosemirror-to-html)

Takes ProseMirror JSON and outputs HTML.

[![Latest Version on Packagist](https://camo.githubusercontent.com/2a727373f04a9f16da231e64364601e4a920fbf4a7892d6f529e106ed5fb3fae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7565626572646f7369732f70726f73656d6972726f722d746f2d68746d6c2e737667)](https://packagist.org/packages/ueberdosis/prosemirror-to-html)[![Integrate](https://github.com/ueberdosis/html-to-prosemirror/workflows/Integrate/badge.svg?branch=main)](https://github.com/ueberdosis/html-to-prosemirror/actions)[![Total Downloads](https://camo.githubusercontent.com/3e4a91be9abe81ac8a6c3177f5b6d702a67d21156f8383dfd6d6a6605488f3b1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7565626572646f7369732f70726f73656d6972726f722d746f2d68746d6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ueberdosis/prosemirror-to-html)[![Sponsor](https://camo.githubusercontent.com/ee73cad5907779cdf16e865239ea623ca0bd44ccd5ad44fa7bfe7a5ac3ced298/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d53706f6e736f72266d6573736167653d254532253944254134266c6f676f3d476974487562)](https://github.com/sponsors/ueberdosis)

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

[](#installation)

```
composer require ueberdosis/prosemirror-to-html
```

Usage
-----

[](#usage)

```
(new \ProseMirrorToHtml\Renderer)->render([
    'type' => 'doc',
    'content' => [
        [
            'type' => 'paragraph',
            'content' => [
                [
                    'type' => 'text',
                    'text' => 'Example Paragraph',
                ],
            ],
        ],
    ],
])
```

Output
------

[](#output)

```
Example Text
```

Supported nodes
---------------

[](#supported-nodes)

- [Blockquote](https://github.com/ueberdosis/prosemirror-to-html/blob/main/src/Nodes/Blockquote.php)
- [BulletList](https://github.com/ueberdosis/prosemirror-to-html/blob/main/src/Nodes/BulletList.php)
- [CodeBlock](https://github.com/ueberdosis/prosemirror-to-html/blob/main/src/Nodes/CodeBlock.php)
- [HardBreak](https://github.com/ueberdosis/prosemirror-to-html/blob/main/src/Nodes/HardBreak.php)
- [Heading](https://github.com/ueberdosis/prosemirror-to-html/blob/main/src/Nodes/Heading.php)
- [Image](https://github.com/ueberdosis/prosemirror-to-html/blob/main/src/Nodes/Image.php)
- [ListItem](https://github.com/ueberdosis/prosemirror-to-html/blob/main/src/Nodes/ListItem.php)
- [OrderedList](https://github.com/ueberdosis/prosemirror-to-html/blob/main/src/Nodes/OrderedList.php)
- [Paragraph](https://github.com/ueberdosis/prosemirror-to-html/blob/main/src/Nodes/Paragraph.php)
- [Table](https://github.com/ueberdosis/prosemirror-to-html/blob/main/src/Nodes/Table.php)
- [TableCell](https://github.com/ueberdosis/prosemirror-to-html/blob/main/src/Nodes/TableCell.php)
- [TableHeader](https://github.com/ueberdosis/prosemirror-to-html/blob/main/src/Nodes/TableHeader.php)
- [TableRow](https://github.com/ueberdosis/prosemirror-to-html/blob/main/src/Nodes/TableRow.php)

Supported marks
---------------

[](#supported-marks)

- [Bold](https://github.com/ueberdosis/prosemirror-to-html/blob/main/src/Marks/Bold.php)
- [Code](https://github.com/ueberdosis/prosemirror-to-html/blob/main/src/Marks/Code.php)
- [Italic](https://github.com/ueberdosis/prosemirror-to-html/blob/main/src/Marks/Italic.php)
- [Link](https://github.com/ueberdosis/prosemirror-to-html/blob/main/src/Marks/Link.php)
- [Strike](https://github.com/ueberdosis/prosemirror-to-html/blob/main/src/Marks/Strike.php)
- [Subscript](https://github.com/ueberdosis/prosemirror-to-html/blob/main/src/Marks/Subscript.php)
- [Superscript](https://github.com/ueberdosis/prosemirror-to-html/blob/main/src/Marks/Superscript.php)
- [Underline](https://github.com/ueberdosis/prosemirror-to-html/blob/main/src/Marks/Underline.php)

Custom nodes
------------

[](#custom-nodes)

Define your custom nodes as PHP classes:

```
