title: Auto capitalize first letter of a sentence using draft-js
body: <p>I'm using Reactjs and draftjs libraries to create a rich text editor. I want to auto-capitalize the first letter of a sentence. </p>
  
  <pre><code>import React from 'react';
  import ReactDOM from 'react-dom';
  import {Editor, EditorState} from 'draft-js';
  
  class MyEditor extends React.Component {
    constructor(props) {
      super(props);
      this.state = {editorState: EditorState.createEmpty()};
      this.onChange = (editorState) =&gt; this.setState({editorState});
    }
    render() {
      return (
          &lt;Editor editorState={this.state.editorState} onChange={this.onChange} 
          autoCapitalize="sentences"/&gt;
      );
    }
  }
  
  ReactDOM.render(
    &lt;MyEditor /&gt;,
    document.getElementById('container')
  );
  </code></pre>
  
  <p>The component that I've created doesn't auto capitalize after period. Why isn't the auto-capitalization not working? Is there any better ways to make it work? </p>