View on GitHub

Jquery-limit-lines

A jQuery plugin to limit the maximum input lines of contenteditable div

Download this project as a .zip file Download this project as a tar.gz file

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

  1. If the input cursor is in the middle of the content, the trailing text would be trimmed
  2. For Chinese input, it might not work as the temp phonetic input would cause the limit handler to trim the content