localheinz / html-to-prosemirror

Takes HTML and outputs ProseMirror compatible JSON.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This repository has been migrated to a new organization (Read more: ueberdosis/tiptap#759)

HTML to ProseMirror

Takes HTML and outputs ProseMirror compatible JSON.

Integrate

Installation

composer require ueberdosis/html-to-prosemirror

Usage

(new \Scrumpy\HtmlToProseMirror\Renderer)->render('<p>Example Text</p>')

Output

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

Contributing

Pull Requests are welcome.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Takes HTML and outputs ProseMirror compatible JSON.

License:MIT License


Languages

Language:PHP 100.0%