I hate when I try to edit html in textarea, because it doesn't recognize tab button, so I cannot indent my code. So is it possible to generate tab support to textareas with html? And is it possible to create support for tab button with JavaScript?
Asked
Active
Viewed 456 times
0
-
This is a duplicate of http://stackoverflow.com/questions/1105452/catching-tabs-in-textarea , which gives a solution using onkeydown. – Matthew Flaschen Mar 02 '10 at 20:50
2 Answers
0
Try to check the key code in keyUp
or keyDown
events against the tab key code: 11
.

Fitzchak Yitzchaki
- 9,095
- 12
- 56
- 96