Update js/functions.js

add support for pressing tab key while inside the editor.