Skip to content

Takes HTML and outputs ProseMirror compatible JSON.

Notifications You must be signed in to change notification settings

wiebkevogel/html-to-prosemirror

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTML to ProseMirror

Takes HTML and outputs ProseMirror compatible JSON.

Installation

composer require scrumpy/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.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%