Plugins
ToDesktop Selected Text
Retrieve the selected text from any application.
Installation
Install @todesktop/client-selected-text in your client-side application using
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
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
unregisterShortcut
Unregisters a global shortcut of accelerator and is equivalent to electron.globalShortcut.unregister