# @types/html-to-draftjs

> TypeScript definitions for html-to-draftjs

Latest version **1.5.0** (published 2025-01-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/html-to-draftjs
pnpm add @types/html-to-draftjs
yarn add @types/html-to-draftjs
bun add @types/html-to-draftjs
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.5.0 |
| Published | 2025-01-03 |
| First published | 2019-09-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/html-to-draftjs
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/html-to-draftjs
- npm.io page: https://npm.io/package/@types/html-to-draftjs

## Dependencies (1)

- [@types/draft-js](https://npm.io/package/@types/draft-js.md) *

## Recent versions

- 1.5.0 (latest) — 2025-01-03
- 1.4.3 (ts4.5) — 2023-11-07
- 1.4.0 (ts2.9) — 2019-09-25
- 1.4.2 — 2023-10-18
- 1.4.1 — 2023-09-16

## README

# Installation
> `npm install --save @types/html-to-draftjs`

# Summary
This package contains type definitions for html-to-draftjs (https://github.com/jpuri/html-to-draftjs#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/html-to-draftjs.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/html-to-draftjs/index.d.ts)
````ts
import { ContentBlock, RawDraftEntity } from "draft-js";

declare function htmlToDraft(
    text: string,
    customChunkRenderer?: (
        nodeName: string,
        node: HTMLElement,
    ) => RawDraftEntity | undefined,
): {
    contentBlocks: ContentBlock[];
    entityMap?: any;
};

export = htmlToDraft;

````

### Additional Details
 * Last updated: Fri, 03 Jan 2025 17:02:21 GMT
 * Dependencies: [@types/draft-js](https://npmjs.com/package/@types/draft-js)

# Credits
These definitions were written by [Ivan Zverev](https://github.com/1cheese).

---
_Source: https://npm.io/package/@types/html-to-draftjs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
