We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de791f6 commit 4b72ea5Copy full SHA for 4b72ea5
README.md
@@ -14,6 +14,7 @@ npm install html-to-draftjs --save
14
import htmlToDraft from 'html-to-draftjs';
15
16
const blocksFromHTML = htmlToDraft(this.props.content);
17
-const contentState = ContentState.createFromBlockArray(blocksFromHTML);
+const contentBlocks = blocksFromHtml.contentBlocks;
18
+const contentState = ContentState.createFromBlockArray(contentBlocks);
19
const editorState = EditorState.createWithContent(contentState);
20
```
0 commit comments