0

I use window.getSelection to get the selected text, then I can use getRangeAt to get the actually range I select

but how can I get all text node I selected? in the Range's property I can only get the startContainer and endContainer, what about the text outside the two container?

I want do some job like the Diigo did, I want use some tag wrap the text for highlight them, how can I do that?

hh54188
  • 14,887
  • 32
  • 113
  • 184

0 Answers0