demo/scripting/sandbox.js
function(e){
		if(e.keyCode === 9){
			e.preventDefault();
			var cursor = this.selectionStart;
			var nv = this.value.substring(0,cursor),
				bv = this.value.substring(cursor, this.value.length);;
			this.value = nv + "\t" + bv;
			this.setSelectionRange(cursor + 1, cursor + 1);
		}
	}
function(e){
		if(e.keyCode === 9){
			e.preventDefault();
			var cursor = this.selectionStart;
			var nv = this.value.substring(0,cursor),
				bv = this.value.substring(cursor, this.value.length);;
			this.value = nv + "\t" + bv;
			this.setSelectionRange(cursor + 1, cursor + 1);
		}
	}
function ( e ) { if ( e . keyCode === 9 ) { e . preventDefault ( ) ; var cursor = this . selectionStart ; var nv = this . value . substring ( 0 , cursor ) , bv = this . value . substring ( cursor , this . value . length ) ; ; this . value = nv + "\t" + bv ; this . setSelectionRange ( cursor + 1 , cursor + 1 ) ; } }
Hook tab keys
Hook tab keys