Using jquery or pure javascript, is there a way to get the currently selected text of a <p> tag? I’m aware of input.selectionStart, but it only exists on <input>.
Using jquery or pure javascript, is there a way to get the currently selected
Share
Here’s a simple solution. Works in chrome, safari, FF, and IE9+, but you will have to test on any other legacy browsers you may want to support. http://jsfiddle.net/YEu3k/1/