Hi there,
I was looking for a way to move the cursor position within a textarea by a given offset.
I have a button that inserts a timestamp and a \n at the beginning of the textarea (moving the rest of the text inside it a line lower), and am looking for a way to move the cursor behind the timestamp instead of behind the whole text so the user could start typing after inserting the timestamp right away instead of having to click or typing at the end of the text.
The timestamp length is constant so there is no need to find out where the desired position is I just haven't got a clue how to move the cursor there, looking for a javascript way to do this without jquery..