Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

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.
 -->
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #limit #characters #contenteditable #div
ADD COMMENT
Topic
Name
1+7 =