title: How to render provided HTML in a draft js editor?
body: <p>I use draft.js editor to create and update posts. Please tell me how to render text from HTML inside draft.js editor.
  I try to use renderHTML, and get the error </p>
  
  <blockquote>
    <p>"'editorState' is not defined  no-undef"</p>
  </blockquote>
  
  <p>Without renderHTML function I get the HTML with tags in editor.
  Tell me please, how to configure component to render the "right HTML"?</p>
  
  <p>Here is the listing:</p>
  
  <pre><code>import React, { Component } from 'react';
  import DatePicker from "react-datepicker";
  import "react-datepicker/dist/react-datepicker.css";
  import { EditorState, getCurrentContent, getPlainText, ContentState } from 'draft-js';
  import { Editor } from 'react-draft-wysiwyg';
  import '../../node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.css';
  import { stateToHTML } from 'draft-js-export-html';
  import gql from 'graphql-tag';
  import { Mutation } from 'react-apollo';
  import renderHTML from 'react-render-html';
  
  const updateMutation = gql`
    mutation UpdateHeroMutation($id: ID!, $title: String!, $description: String!, $date: String!) {
    updateHero(heroUpdate: {_id: $id, title: $title, description: $description, date: $date}) {
      _id
      title
      description
      date
    }
  }
  `;
  
  class Hero extends Component {
    constructor(props) {
      super(props);
      this.state = {
        title: '',
        setDate: new Date(),
        editorState: EditorState.createWithContent(ContentState.createFromText(renderHTML(props.data.description)))
      };
    }
    onChange(e) {
      this.setState({ title: e.target.value })
    }
    onChangeSelect(published) {
      this.setState({ setDate: published })
    }
    onEditorStateChange = (editorState) =&gt; {
      this.setState({
        editorState
      });
    }
    render() {
      return (
        &lt;&gt;
          &lt;div className="label-section"&gt;Название:&lt;/div&gt;
          &lt;h5&gt;
            &lt;input name="title" id="title" type="text" defaultValue={this.props.data.title} onChange={e =&gt; this.onChange(e)} /&gt;
          &lt;/h5&gt;
          &lt;br /&gt;
          &lt;div className="label-section"&gt;Дата публикации:&lt;/div&gt;
          &lt;DatePicker
            id="published"
            name="published"
            defaultValue=""
            selected={this.state.setDate}
            onChange={published =&gt; this.onChangeSelect(published)}
          /&gt;
          &lt;div className="label-section"&gt;Редактировать текст:&lt;/div&gt;
          &lt;Editor
            editorState={this.state.editorState}
            wrapperClassName="demo-wrapper"
            editorClassName="demo-editor"
            onEditorStateChange={this.onEditorStateChange}
          /&gt;
          &lt;input type="text" className="hidden" defaultValue={this.props.data._id} /&gt;
          &lt;Mutation mutation={updateMutation} variables={{ id: this.props.data._id, title: this.state.title, description: stateToHTML(this.state.editorState.getCurrentContent()), date: this.state.setDate }}&gt;
            {updateHero =&gt; (
              &lt;button onClick={updateHero} type="submit"&gt;OK&lt;/button&gt;
            )}
          &lt;/Mutation&gt;
        &lt;/&gt;
      );
    }
  }
  
  export default Hero;
  </code></pre>
  
  <p>Will be very grateful for any help!</p>