Skip to main content

Convert HTML to Editor.js JSON format.

Project description

HTML to Editor.js JSON

Convert HTML to Editor.js JSON format

Installation

pip install html_to_editorjs

Usage

from html_to_editorjs import parse


json = parse("""
    <h1>My Page</h1>

    <h2>Introduction</h2>

    <p>Some <em>content</em> that is pretty <strong>interesting</strong></p>
    <p>Don't forget to <a href="https://example.com">follow me!</a></p>

    <h2>Illustration</h2>
    <img src="https://example.com/image.png" alt="image"/>
""")

Supported blocks

  • Paragraph (p)
  • Header (h1, h2, h3, h4, h5)
  • List (ul, ol)
  • Image (img, figure, figcaption)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

html-to-editorjs-0.0.1.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

html_to_editorjs-0.0.1-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page