javascript - how to check if selected text is inside two lines of text -


We have the text in the document and some part of the text was chosen by the user as a mouse: < pre> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa **** aaaa aaaaaaaaaaaaaaaaaaaaa aaaaaaa a aaaaaaa aaaaaaaaaaaaa aaaa **** aaaaaaaa aaaaaaaaaaaaaaaaaaa aaaaaaaaaaa

select how I can check only a line or two ?

The html structure is like:

     

Actually do not know what you are going for, but this might help Can do;

The related goals, elements, two elements under section '- & gt; When you give an ID to the span elements, you can check which element you started, and in which you ended. Due to having a cross in the elements to know it.

I do not think the text is wrapping, resolution, screen size, due to the font, on which the user starts (on screen), it is quite possible size etc.

Comments