Find Line Above or Below in Javascript
- by Dark Falcon
I am working on an in-place HTML editor, concentrating on Firefox only right now. I have an element inserted where the cursor should be and also have left and right arrows working, but I can't seem to find a way to find:
Start and end of a line for the home and end keys
The next line up or down for the up/down arrows.
I see document.elementFromPoint, but this doesn't get me a Range object. The Range object itself seems rather useless when it comes to using pixel positions.