A very simple Editor.js parser written in pure Python.
Soon-to-be published on PyPI.
- Automatically convert Editor.js’s JSON output to HTML;
- Sanitization and automatic anchor link converting done by using bleach;
- Supports Tailwind CSS by default;
- WYSIWYG – output is made to look as similar to editor as possible.
pyEditorJS requires Python 3.6 or newer. It is very simple to get started:
from pyeditorjs import load DATA = ... # JSON string/dict of Editor.js output data HTML = load(DATA) print(HTML) # HTML str
You can then pass the HTML string to a parser like BeautifulSoup to beautify or modify the result HTML.
example.html files in this project’s GitHub repository for sample outputs.
- Add support for all out-of-box Editor.js elements;
- Do a PyPI release (using GH actions);
- Add support for more blocks from Editor.js extensions