Read more

How to get the currently selected text in Javascript

Dominik Schöler
February 10, 2017Software engineer at makandra GmbH

Simple:

window.getSelection().toString();
Illustration online protection

Rails professionals since 2007

Our laser focus on a single technology has made us a leader in this space. Need help?

  • We build a solid first version of your product
  • We train your development team
  • We rescue your project in trouble
Read more Show archive.org snapshot

Browser support: IE9+, Android 4.3+, Safari 5+

Posted by Dominik Schöler to makandra dev (2017-02-10 12:20)