Created
November 1, 2012 21:12
-
-
Save bloudermilk/3996580 to your computer and use it in GitHub Desktop.
Github-style text areas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Enables {command,ctrl}+enter on all textareas | |
# Author: Nick Giancola (@patbenatar) | |
$ -> | |
$("textarea").keydown (e) -> | |
if (e.ctrlKey or e.metaKey) and e.keyCode is 13 | |
$("textarea").closest("form").submit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment