function initTab() {
    var editor = document.getElementById("editor");

    editor.onkeydown = function (event) {

        if (event.keyCode == 9) { // tab was pressed
            putChar('\t', 1);
            editor.focus();
            return false;
        }
    }
}
/**
 * Initialize using of tab in #editor.
 */
Initialize using of tab in #editor.
Initialize using of tab in #editor .
function initTab() {
    var editor = document.getElementById("editor");
    editor.onkeydown = function (event) {
        if (event.keyCode == 9) { 
            putChar('\t', 1);
            editor.focus();
            return false;
        }
    }
}
function initTab ( ) { var editor = document . getElementById ( "editor" ) ; editor . onkeydown = function ( event ) { if ( event . keyCode == 9 ) { putChar ( '\t' , 1 ) ; editor . focus ( ) ; return false ; } } }
Initialize using of tab in #editor.
Initialize using of tab in #editor .
// tab was pressed