108
rated 0 times
[
111]
[
3]
/ answers: 1 / hits: 27495
/ 13 Years ago, fri, april 15, 2011, 12:00:00
I've got the following code:
document.onkeydown=function(e) {
if (e.which == 13 && isCtrl) {
log('Ctrl CR');
} else if (e.which == 17) {
isCtrl = true;
};
I need to insert a Carriage Return/Line feed where the cursor is located in the input textarea.
Now that I think about it, I should probably be using a textarea selector instead of document.onkeydown, but $('textarea').onkeydown doesn't work.
More From » jquery