views:

113

answers:

2

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?

A: 

Try to check the key code in keyUp or keyDown events against the tab key code: 11.

Mendy
A: 

Here's a tutorial that explains the process very well.

http://ajaxian.com/archives/handling-tabs-in-textareas

ferrari fan