Answers for "how to limit characters in contenteditable div"

1

how to limit characters in contenteditable div

<div onkeypress="return (this.innerText.length <= 0)" contenteditable="true"> 
  
<!-- Allows user to only input one character in the div
	 Change the this.innerText.length <= 0 value to change the limit of characters.
 -->
Posted by: Guest on April-04-2022

Code answers related to "how to limit characters in contenteditable div"

Browse Popular Code Answers by Language