How to limit Max Length of Draft js : <p>How to limit max characters in draft js?</p>

<p>I can get length of the state like that, but how to stop updating component?</p>

<pre><code>var length = editorState.getCurrentContent().getPlainText('').length;
</code></pre>
