When you’re typing a comment in facebook, the comment textarea automatically resizes as you type. If you hit enter, it posts the comment, and if you hit ctrl + enter, it goes to the next line while resizing.
I’m looking for a javascript / jquery plugin that achieves the same thing.
-
Resizes textareas smoothly while you type, like facebook, works in all new browsers
-
Is able to be called dynamically, e.g if a new textarea is added via javascript, its able to be called right after and assigned to that textarea.
-
Has an option/feature to have enter’s ignored and call a callback function instead for posting what the user has typed when he hits enter.
-
Has an option/feature to be pushed to the new line when ctrl + enter is pressed.
Any suggestions?
I don’t know if any such plugin already exists but if you don’t find one you can make your own. I came up with this real quick, maybye you can use it as a starting template (by no means is it perfect or does everything you need):
http://jsfiddle.net/NfWAn/