I am using the ace editor component from ajax.org inside a jquery tab interface.
Each tab will contain a separate ace editor. Whenever I switch to a new tab, the editor in it wo
editor.focus(); //To focus the ace editor
var n = editor.getSession().getValue().split("\n").length; // To count total no. of lines
editor.gotoLine(n); //Go to end of document