Let’s say a user selects (with his/her mouse) the first line of a paragraph. Later, he/she selects another line farther down the page. Is there a way to keep the previously selected text (in addition to the newly selected text) highlighted? How could I go about achieving this?
Many thanks in advance.
Yes, you can do this with a combination of checking the mouseDown/mouseUp event, and document.selection/getSelection.
The general logic is this:
It would behoove you to use something to handle cross-browser implementation. Check out this guy’s snippet