html-to-draft
parse html to draft js content state
Tested on latest versions of Firefox, Chrome, Safari
Install
npm install --save html-to-draft
convertFromHtml
Usage This package just contains one method, to convert html to draft js content state. For starters, here's all the type info you need to build custom converters.
type TextFragment = offset: number length: number inlineStyleRanges: ?Array<string> entity: ? type: string data: ?Object }} type AtomicBlock = type: 'atomic' entity: ? type: string data: ?Object } data: ?Object} type TextBlock = type: ?string depth: ?number data: ?Object}
License
MIT © tettra
Developed by Julian Krispel