Get cursor position (line, ch) – is it possible?

Hey all!

Is it possible to get the cursor position (line and ch)? cursorCoords exists, but it isn’t really what I’m looking for. The docs reference setCursor, which makes hopeful to find out that you can indeed get the pos since you can set the pos…

i dun goofed… There is getCursor – I’m just frigging blind!

Ah, so happy that discourse can’t let you delete your own threads… great.

Hello! Do you have an example for CM 6?

hello! this is guide.
https://codemirror.net/6/docs/migration/

2 Likes