var editor = ace.edit("editor"); editor.session.insert({row: editor.session.getLength(), column: 0}, "\n New line added!");
var editor = ace.edit("editor"); editor.gotoLine(5); editor.selection.moveCursorFileStart(); editor.selection.selectFileEnd();This code highlights the 5th line in the Ace Editor by moving the cursor to the start of the line and selecting everything until the end of the file. Package library: Ace Editor.