Skip to content

eush77/expand-selection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm

expand-selection

Dependency Status

Add matching text to the current DOM selection.

API

expandSelection(string, [opts])

expandSelection([selection], [opts])

Searches document for string or selection.toString() and selects matching ranges.

selection defaults to window.getSelection().

Returns Selection object.

opts.clear

Clears current selection before updating. Defaults to false.

opts.ignoreCase

Whether to ignore case while attempting a match in a string. Defaults to false.

Install

npm install expand-selection

License

MIT

About

Add matching text to the current DOM selection

Resources

License

Stars

Watchers

Forks

Packages

No packages published