Determine mouse pointer location in terms of code row / column

Hi There,

I would like to create hover functionality based on which piece of code the mouse pointer is currently hovering owner. Is there a function in the code mirror API that can translate the current mouse position into row and column numbers in the original source code or perhaps the number of the character in the original code string?

Any other suggestions on how to implement this would be much appreciated!

I think you’re looking for coordsChar.

Very cool - thanks so much!