@todesktop/client-selected-text
Advanced tools
Comparing version 0.14.0 to 0.15.0
{ | ||
"name": "@todesktop/client-selected-text", | ||
"version": "0.14.0", | ||
"version": "0.15.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -1,14 +0,5 @@ | ||
- [ToDesktop Client Selected Text](#todesktop-client-selected-text) | ||
- [Installation](#installation) | ||
- [Usage](#usage) | ||
- [Architecture](#architecture) | ||
- [Development](#development) | ||
# ToDesktop Selected Text | ||
# ToDesktop Client Selected Text | ||
Retrieve the selected text from any application. | ||
This is the repo for the [ToDesktop Selected Text](https://github.com/ToDesktop/todesktop-selected-text) client. | ||
This is a zero-dependency package for interacting with [@todesktop/plugin-selected-text](https://www.npmjs.com/package/@todesktop/plugin-selected-text). This package exposes a set of functions for getting selected text from any application. | ||
## Installation | ||
@@ -19,6 +10,6 @@ | ||
```sh | ||
$ npm install @todesktop/client-selected-text | ||
npm install @todesktop/client-selected-text | ||
``` | ||
Installation of the [plugin](https://www.npmjs.com/package/@todesktop/plugin-selected-text) package is also necessary. | ||
Installation of the [plugin](https://www.npmjs.com/package/@todesktop/plugin-selected-text) package is also necessary. Using ToDesktop Builder, navigate to **Plugins.** Click on the **Explore** button for "Selected Text" and install the package. | ||
@@ -29,2 +20,4 @@ ## Usage | ||
### `getSelectedText` | ||
```js | ||
@@ -36,3 +29,3 @@ import { getSelectedText } from "@todesktop/client-selected-text"; | ||
<br /> | ||
### `registerShortcut` | ||
@@ -51,3 +44,3 @@ Registers a global shortcut of `accelerator`. The `callback` is called with the selected text when the registered shorcut is pressed by the user | ||
<br /> | ||
### `unregisterShortcut` | ||
@@ -61,13 +54,1 @@ Unregisters a global shortcut of `accelerator` and is equivalent to electron.globalShortcut.unregister | ||
``` | ||
## Architecture | ||
This package requires the following files: | ||
- `src/index.ts`: exposes plugin functionality through strongly-typed, easy-to-use functions. | ||
- `src/generated/plugin.d.ts`: automatically generated types from `@todesktop/plugin-selected-text`'s `index.ts` file. | ||
## Development | ||
Refer to the [root](https://github.com/ToDesktop/todesktop-selected-text) repo for development instructions. |
5286
50