0

The Selection API allows me to get the current selection with window.getSelection() and edit the selection with

selection.modify('extend', 'backward', 'character');

to, for example, go back a character.

But how can I actually select text with the selection API?

d4nyll
  • 10,729
  • 6
  • 49
  • 65
mikemaccana
  • 94,893
  • 84
  • 350
  • 433

0 Answers0