title: Primefaces rich editor
body: <p>I'm using primefaces(3.0.M2) rich editor for receiving input from user. The restriction is 5000 characters. When user tries to copy from external sources or beautify the content additional tags are getting added to preserve the format.</p>
  
  <p>Now to validate the max length of 5000, I need to strip out the tags and only count the characters length. How to get the characters alone from in managed bean for validation?</p>
  
  <p>client side validation snippet:</p>
  
  <pre><code>&lt;p:editor    id="customerInfo"    value="#{companyBean.body}" 
        required="false"    requiredMessage="Info required"    height="250"    width="450"
        validatorMessage="Only 5000 characters allowed"&gt;
       &lt;f:validateLength maximum="5000" /&gt;
   &lt;/p:editor&gt;
  </code></pre>