This jQuery plugin provides dead simple methods for getting and setting the selected text in DOM elements. It provides a suite of related tools that all manipulate text within a jQuery element, such as replacing the selected text (or a given character range) with a string.
- jQuery 1.3 or higher (including jQuery 2).
- Does not work with TinyMCE, CKEditor, or other WYSIWYG editors. Each editor provides this functionality in their own API.
- Demo (dwieeb.github.com)
- jQuery TextRange (plugins.jquery.com)
- License (raw.github.com)
<script src="js/jquery-textrange/src/jquery-textrange.min.js"></script>