I have an HTML div element in my application as follows:
<div id="DivId" contenteditable="true" style="border:1px solid black"></div>
I need to limit the number of characters that can be typed in the div. Like giving the maxlength attribute a to textbox. How can I do this? It would be very helpful if I would be able to do it without using JavaScript or jQuery.