title: Wysihtml5 editor - Limit number of characters
body: <p>I have this:</p>
  
  <pre><code>&lt;div class="row"&gt;
      &lt;div class="col-md-11"&gt;
          &lt;label for="" class="control-label"&gt;Description&lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
          @Html.TextAreaFor(m =&gt; m.Description, new { @class = "editor", @maxlength = "500" })&lt;br /&gt;
          @Html.ValidationMessageFor(model =&gt; model.Description)
       &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and the js for the wysihtml5 editor (using <strong>Razor engine</strong>):</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $('.editor').wysihtml5({
          stylesheets: "/Content/css/wysiwyg-color.css",
          charset: "utf-8"
      })
  &lt;/script&gt;
  </code></pre>
  
  <p>So basically what I'm trying to do is limit the number of characters <em>(500 char max)</em> in this field. As you can see, I've set the <code>maxlength</code> attribute in the <code>@Html.TextAreaFor</code>, but it didn't worked. </p>
  
  <p>Can someone please show me how to do this? Thanks in advance.  </p>