PHPackages                             cjprinse/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. cjprinse/prosemirror-to-html

ActiveLibrary

cjprinse/prosemirror-to-html
============================

Takes HTML and outputs ProseMirror compatible JSON.

2.1.0(5y ago)01.5k1MITPHPPHP ^7.1.3

Since Jan 23Pushed 5y agoCompare

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

READMEChangelogDependencies (3)Versions (19)Used By (0)

> We need your support to maintain this package. 💖

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
- BulletList
- CodeBlock
- HardBreak
- Heading
- Image
- ListItem
- OrderedList
- Paragraph
- Table
- TableRow
- TableHeader
- TableCell

Supported Marks
---------------

[](#supported-marks)

- Bold
- Code
- Italic
- Link
- Strike
- Subscript
- Superscript
- Underline

Custom Nodes
------------

[](#custom-nodes)

Define your custom nodes as PHP classes:

```
