Set Value for ace editor without selecting the whole editor

You can use the second parameter to control cursor position after setValue

editor.setValue(str, -1) // moves cursor to the start
editor.setValue(str, 1) // moves cursor to the end

Leave a Comment