%global _empty_manifest_terminate_build 0 Name: python-draftjs-exporter Version: 5.0.0 Release: 1 Summary: Library to convert rich text from Draft.js raw ContentState to HTML License: MIT URL: https://github.com/springload/draftjs_exporter Source0: https://mirrors.nju.edu.cn/pypi/web/packages/29/5b/7729b1a95d48d2f51b03feacda1d5b17058e1caec524592e59d0df801a8c/draftjs_exporter-5.0.0.tar.gz BuildArch: noarch Requires: python3-beautifulsoup4 Requires: python3-html5lib Requires: python3-lxml %description # Draft.js exporter [![PyPI](https://img.shields.io/pypi/v/draftjs_exporter.svg)](https://pypi.org/project/draftjs_exporter/) [![PyPI downloads](https://img.shields.io/pypi/dm/draftjs_exporter.svg)](https://pypi.org/project/draftjs_exporter/) [![Build status](https://github.com/springload/draftjs_exporter/workflows/CI/badge.svg)](https://github.com/springload/draftjs_exporter/actions) [![Coveralls](https://coveralls.io/repos/github/springload/draftjs_exporter/badge.svg?branch=main)](https://coveralls.io/github/springload/draftjs_exporter?branch=main) > Library to convert rich text from Draft.js raw ContentState to HTML. It is developed alongside the [Draftail](https://www.draftail.org/) rich text editor, for [Wagtail](https://github.com/wagtail/wagtail). Check out the [online demo](http://playground.draftail.org/), and our [introductory blog post](https://www.draftail.org/blog/2018/03/13/rethinking-rich-text-pipelines-with-draft-js). ## Why [Draft.js](https://draftjs.org/) is a rich text editor framework for [React](https://reactjs.org/). 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](https://www.draftail.org/blog/2018/03/13/rethinking-rich-text-pipelines-with-draft-js). ## Features This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), and [measures performance](https://thib.me/python-memory-profiling-for-the-draft-js-exporter) and [code coverage](https://coveralls.io/github/springload/draftjs_exporter). Code is checked with [mypy](https://mypy.readthedocs.io/en/latest/index.html). - Extensive configuration of the generated HTML. - Default, extensible block & inline style maps for common HTML elements. - Convert line breaks to `
` elements. - 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 (`
  • ` elements go inside `