I’m using nicedit on a textarea to allow rich editor functionality.
I also want to add character counter at the end of the textarea in order to let user type specific number of character in the textarea. I use the above code and the editor works great.
<script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script>
<script type="text/javascript">bkLib.onDomLoaded(nicEditors.allTextAreas);</script>
Thanks
So, you just need to know the number of characters in a textarea?
You can get that with the textarea’s value’s length property:
textarea.value.lengthHere’s an example:
Here’s a char count check. It is not foolproof, but it will get you started:
Also, remember that Stack Overflow is a programmer help site. We’ll help with coding troubles, but we don’t just write programs for people (there’s plenty of sites for that 😉 ).