title: How to convert the draft.js output to plain html code using draft-js-html
body: <p>I need to have around 6 text-editors for different fields so that the user can modify the text as bold, italic, underline, add images to it.I need to send the data as a plain HTML to db and receive data in the same format.I'm using react-draft-wysiwyg, for conversion draft-js-html. Please help me with that</p>
  
  <pre><code>  import React, { Component } from 'react';
    import { Editor } from 'react-draft-wysiwyg';
    import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';
    import draftToHtml from 'draftjs-to-html';
    import { EditorState, convertToRaw} from 'draft-js';
  
    class Aboutus extends Component {
     constructor(props) {
     super(props);
      this.state = {
        editorStateLabel1: EditorState.createEmpty(),
        editorStateLabel2: EditorState.createEmpty(),
        aboutus:'',
        inProgress: false,
        uploadedImages:[],
       };
       this.onEditorStateChange = this.onEditorStateChange.bind(this);
       this.uploadCallback = this.uploadCallback.bind(this);
      }
  
      uploadCallback(file){
      let uploadedImages = this.state.uploadedImages
       const imageObject = {
       file: file,
       localSrc: URL.createObjectURL(file),
       }
      uploadedImages.push(imageObject);
      this.setState(uploadedImages:uploadedImages)
      return new Promise(
      (resolve, reject) =&gt; {
      resolve({ data: { link: imageObject.localSrc } });
      }
     );
     } 
  
       onEditorStateChange(type, editorState) {
         var aboutus = {};
         aboutus[type] = 
         draftToHtml(convertToRaw(editorState.getCurrentContent()))
         this.setState({
           aboutus
          });
         }
  
    render() {
      return (
       &lt;div&gt;
          &lt;h4&gt;label-1&lt;/h4&gt;
           &lt;Editor
             toolbar={{ image: { uploadCallback: this.uploadCallback 
              }}}
            editorState={this.state.aboutus.editorStateLabel1}
            onEditorStateChange={this.onEditorStateChange.bind(this, 
             'editorStateLabel1')}
          /&gt;
        &lt;/Col&gt;
      &lt;/Row&gt;
      &lt;Row&gt;
        &lt;Col md={18}&gt;
        &lt;h4&gt;label-2&lt;/h4&gt;
          &lt;Editor
            toolbar={{ image: { uploadCallback: this.uploadCallback 
              }}}
            editorState={this.state.aboutus.editorStateLabel2}
            onEditorStateChange={this.onEditorStateChange.bind(this, 
             'editorStateLabel2')}
          /&gt;
           &lt;/Col&gt;
          &lt;/Row&gt;
        &lt;/div&gt;
        );
      }
    }
   export default Aboutus;
  </code></pre>
  
  <p>I am getting an error like Uncaught Type Error: editorState.getImmutable is not a function</p>