npm.io
1.5.0 • Published 1 year ago

@types/html-to-draftjs

Licence
MIT
Version
1.5.0
Deps
1
Size
3 kB
Vulns
0
Weekly
0
Stars
51.4K

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

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

Credits

These definitions were written by Ivan Zverev.