0.17.0 • Published 19 days ago

@todesktop/plugin-selected-text v0.17.0

Weekly downloads
-
License
ISC
Repository
github
Last release
19 days ago

ToDesktop Selected Text

Retrieve the selected text from any application.

Installation

Install @todesktop/client-selected-text in your client-side application using

npm install @todesktop/client-selected-text

Installation of the plugin package is also necessary. Using ToDesktop Builder, navigate to Plugins. Click on the Explore button for "Selected Text" and install the package.

Usage

Gets selected text by synthesizing the keyboard shortcut "CommandOrControl+c" then reading text from the clipboard

getSelectedText

import { getSelectedText } from "@todesktop/client-selected-text";

getSelectedText().then((selectedText) => console.log(selectedText));

registerShortcut

Registers a global shortcut of accelerator. The callback is called with the selected text when the registered shorcut is pressed by the user

Returns true if the shortcut was registered successfully

import { registerShortcut } from "@todesktop/client-selected-text";

const isRegistered = registerShortcut("F6", (selectedText) =>
  console.log(selectedText)
);

unregisterShortcut

Unregisters a global shortcut of accelerator and is equivalent to electron.globalShortcut.unregister

import { unregisterShortcut } from "@todesktop/client-selected-text";

unregisterShortcut("F6"); // void
0.17.0

19 days ago

0.14.0

8 months ago

0.15.0

7 months ago

0.16.0

7 months ago

0.13.0

1 year ago

0.12.0

2 years ago

0.10.0

2 years ago

0.11.0

2 years ago

0.9.0

2 years ago

0.8.0

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.5.0-alpha-1

2 years ago

0.5.0-alpha-0

2 years ago

0.5.0-alpha.0

2 years ago

0.5.0-alpha

2 years ago

0.5.0

3 years ago

0.4.0

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago