Need to obtain cursor absolute position

I need to obtain the top and left absolute position of the cursor in a CodeMirror editor to display a popup div containing some help information. getCursor returns the line number and the character, but that doesn’t give me top/left. It seems that I could use findPosH/V but I couldn’t find any examples. Any help will be greatly appreciated.

I found it,

var coords = cm.cursorCoords(true);

2 Likes