Author: | ali-kamalizade |
---|---|
Views Total: | 524 views |
Official Page: | Go to website |
Last Update: | March 12, 2019 |
License: | MIT |
Preview:

Description:
text-select is a pure JavaScript text selection library which gives you the ability to select the full or a part of the text of a given element.
How to use it:
Install & Import.
# NPM $ npm install @alidev/text-select --save
import {selectElementText, selectText} from '@alidev/text-select';
Select the full text of an element.
selectElementText(document.getElementById('paragraph'));
Select a part of the text based on the string you specify.
selectText(document.getElementById('paragraph', 'text to select'));