# draft-js-import-html

> DraftJS: Import HTML to ContentState

Latest version **1.4.1** (published 2019-07-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install draft-js-import-html
pnpm add draft-js-import-html
yarn add draft-js-import-html
bun add draft-js-import-html
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.1 |
| Published | 2019-07-30 |
| First published | 2016-03-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 16.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 880 |
| Author | sstur@me.com |
| Maintainers | sstur |
| Keywords | draft-js, import-html |

## Links

- npm: https://www.npmjs.com/package/draft-js-import-html
- Repository: https://github.com/sstur/draft-js-utils/tree/master/packages/draft-js-import-html
- Homepage: https://github.com/sstur/draft-js-utils/blob/master/packages/draft-js-import-html/README.md
- Issues: https://github.com/sstur/draft-js-utils/issues
- npm.io page: https://npm.io/package/draft-js-import-html

## Dependencies (1)

- [draft-js-import-element](https://npm.io/package/draft-js-import-element.md) ^1.4.0

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.4.1 (latest) — 2019-07-30
- 1.4.0 — 2019-07-29
- 1.3.3 — 2019-02-28
- 1.3.2 — 2019-02-27
- 1.3.0 — 2019-01-29
- 1.2.1 — 2017-10-05
- 1.2.0 — 2017-09-19
- 1.1.0 — 2017-09-07
- 1.0.2 — 2017-09-03
- 1.0.1 — 2017-09-03
- 0.4.0 — 2017-07-27
- 0.3.2 — 2016-11-03
- 0.3.1 — 2016-10-23
- 0.3.0 — 2016-10-17
- 0.2.2 — 2016-10-05
- … 12 more at https://npm.io/package/draft-js-import-html/versions

## README

# DraftJS: Import HTML to ContentState

This is a module for [DraftJS](https://github.com/facebook/draft-js) that will convert HTML to editor content.

It was extracted from [React-RTE](https://react-rte.org) and placed into a separate module for more general use. Hopefully it can be helpful in your projects.

## Installation

    npm install --save draft-js-import-html

## How to Use

    import {stateFromHTML} from 'draft-js-import-html';
    let contentState = stateFromHTML(html);

This project is still under development. If you want to help out, please open an issue to discuss or join us on [Slack](https://draftjs.slack.com/).

## License

This software is [BSD Licensed](/LICENSE).

---
_Source: https://npm.io/package/draft-js-import-html · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
