Posted 8 months 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+

By refactoring problematic code and creating automated tests, makandra can vastly improve the maintainability of your Rails application.

Author of this card:

Avatar
Dominik Schöler
Last edit:
8 months 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