Introduction.
jQuery limitLines is a simple plug-in to limit the maximum input lines of div with contenteditable attribute.
If you're using the GitHub for Mac, simply sync your repository and you'll see the new branch.
Usage
$('div').limitLine({ limitLines: 2 });
License
Creative Commons Attribution 3.0 License
Authors and Contributors
Kenny.SW Lee kswlee@gmail.com (kswlee @ github), http://www.kennylee.co
Known issues
- If the input cursor is in the middle of the content, the trailing text would be trimmed
- For Chinese input, it might not work as the temp phonetic input would cause the limit handler to trim the content