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.
2 parents f3744b4 + bb6127c commit aaddcb9Copy full SHA for aaddcb9
README.md
@@ -14,7 +14,7 @@ npm install html-to-draftjs --save
14
import { EditorState, ContentState } from 'draft-js';
15
import htmlToDraft from 'html-to-draftjs';
16
17
-const blocksFromHTML = htmlToDraft(this.props.content);
+const blocksFromHtml = htmlToDraft(this.props.content);
18
const contentBlocks = blocksFromHtml.contentBlocks;
19
const contentState = ContentState.createFromBlockArray(contentBlocks);
20
const editorState = EditorState.createWithContent(contentState);
0 commit comments