A previous release had provenance metadata, but this release does not. View details.
Draft.js exporter
Library to convert rich text from Draft.js raw ContentState to HTML.
Features
This project adheres to Semantic Versioning, and measures performance and code coverage. Code is checked with mypy.
- Extensive configuration of the generated HTML.
- Default, extensible block & inline style maps for common HTML elements.
- Convert line breaks to
<br>elements with decorators. - Define any attribute in the block map – custom class names for elements.
- React-like API to create custom components.
- Automatic conversion of entity data to HTML attributes (int & boolean to string, style object to style string).
- Nested lists (
<li>elements go inside<ul>or<ol>, with multiple levels). - Output inline styles as inline elements (
<em>,<strong>, pick and choose, with any attribute). - Overlapping inline style and entity ranges.
- Static type annotations.
It is developed alongside the Draftail rich text editor, for Wagtail. Check out the online demo, and our introductory blog post.
When to use the exporter
Draft.js is a rich text editor framework for React. Its approach is different from most rich text editors because it does not store data as HTML, but rather in its own representation called ContentState. This exporter is useful when the ContentState to HTML conversion has to be done in a Python ecosystem.
The initial use case was to gain more control over the content managed by rich text editors in a Wagtail/Django site. If you want to read the full story, have a look at our blog post: Rethinking rich text pipelines with Draft.js.
Documentation
The full documentation is available at on the docs website. For LLM-assisted tooling, there is also a concise llms.txt and a complete llms-full.txt.
Contributing
See anything you like in here? Anything missing? We welcome all support, whether on bug reports, feature requests, code, design, reviews, tests, documentation, and more. Please have a look at our contribution guidelines.
Credits
Draftail was created by Springload, and is now maintained by Wagtail contributors. View the full list of contributors. MIT licensed.
Metadata
Release files for draftjs_exporter 7.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Loss of provenance
These files do not have provenance metadata, despite files in a prior release including this data.
We recommend further investigation before installing these files. View details.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| draftjs_exporter-7.3.1.tar.gz | 60.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| draftjs_exporter-7.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 135.9 kB
Release files / draftjs_exporter-7.3.1.tar.gz
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | draftjs_exporter-7.3.1.tar.gz |
|---|---|
| Size | 60.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
557e2afb861f9447c8d503089ec140e45e1bbfb4acdce745e589291f117dac93
|
|
BLAKE2b-256 checksum How to use checksums |
a5cdf6e8e34690eccd80e551b39a64e81ce22a1b82422a4384d346ba8c1d5b45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / draftjs_exporter-7.3.1-py3-none-any.whl
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | draftjs_exporter-7.3.1-py3-none-any.whl |
|---|---|
| Size | 75.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eddd07ee418c5f85c6a2900887fa1eb50de0c5f6533193497b1fe063803210e9
|
|
BLAKE2b-256 checksum How to use checksums |
5eb391c4b92c67afbc70856911467ec6d239e5f0fa0f91974b7a415f168f29fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for draftjs_exporter 7.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Loss of provenance
A previous release of these files had provenance metadata, but this release does not.
While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.
Release comparison
- Removed 7.3.0 2 files With provenance
- Added 7.3.1 2 files Without provenance
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.