toggle-selection

WebJar for toggle-selection

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

toggle-selection
Last Version

Last Version

1.0.6
Release Date

Release Date

Type

Type

jar
Description

Description

toggle-selection
WebJar for toggle-selection
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/sudodoki/toggle-selection

Download toggle-selection

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/toggle-selection/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>toggle-selection</artifactId>
    <version>1.0.6</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/toggle-selection/
implementation 'org.webjars.npm:toggle-selection:1.0.6'
// https://jarcasting.com/artifacts/org.webjars.npm/toggle-selection/
implementation ("org.webjars.npm:toggle-selection:1.0.6")
'org.webjars.npm:toggle-selection:jar:1.0.6'
<dependency org="org.webjars.npm" name="toggle-selection" rev="1.0.6">
  <artifact name="toggle-selection" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='toggle-selection', version='1.0.6')
)
libraryDependencies += "org.webjars.npm" % "toggle-selection" % "1.0.6"
[org.webjars.npm/toggle-selection "1.0.6"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Toggle Selection

Simple module exposing function that deselects current browser selection and returns function that restores selection.

var deselect = require('toggle-selection');
var reselect = deselect(); // remove all selection
// … 
// do something with current selection, text, etc;
// …
reselect(); // restore selection

All credits go to @shvaikalesh.

Example

example recording

Versions

Version
1.0.6