title: Limit/Count Characters in CKEditor w/ Jquery
body: <p>I am using CKEditor for my wysiwyg editor and I need to monitor and limit the character count as they are typing I have a jquery script that works fine for a normal TextArea</p>
  
  <pre><code>&lt;script type ="text/javascript" language="javascript"&gt;
      function limitChars(textid, limit, infodiv) {
          var text = $('.' + textid).val();
          var textlength = text.length;
          if (textlength &gt; limit) {
              $('#' + infodiv).html('You cannot write more then ' + limit + ' characters!');
              $('#' + textid).val(text.substr(0, limit));
              return false;
          }
          else {
              $('#' + infodiv).html('You have ' + (limit - textlength) + ' characters left.');
              return true;
          }
      }
  
      $(function() {
  
          $('.comment-1').keyup(function() {
              limitChars('comment-1', 1000, 'charlimitinfo-1');
          })
      });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>However this doesn't seem to work for when the textArea is replaced with the CKEditor any ideas?</p>