Takes HTML and outputs ProseMirror compatible JSON.
composer require scrumpy/html-to-prosemirror
(new \Scrumpy\HtmlToProseMirror\Renderer)->render('<p>Example Text</p>')
{
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Example Text"
}
]
}
]
}
Pull Requests are welcome.
The MIT License (MIT). Please see License File for more information.