Posted about 1 month ago. Visible to the public.

How to get the currently selected text in Javascript

Simple:

Copy
window.getSelection().toString();

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

makandra has been working exclusively with Ruby on Rails since 2007. Our laser focus on a single technology has made us a leader in this space.

Author of this card:

Avatar
Dominik Schöler
Last edit:
about 1 month ago
by Dominik Schöler
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Dominik Schöler to makandropedia