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
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