textwrench-observer
Version:
Cross-platform (Mac/Win) library to get OS-level text selection, process it, and paste automatically.
38 lines (22 loc) ⢠740 B
Markdown
# text-observer
> A cross-platform (Mac/Windows) library for observing OS-level text selections, processing text, updating clipboard, and automatic pasting.
## š Features
- Real-time OS-level text selection observing.
- Automatic clipboard updating and pasting.
- Easy Node.js integration with Electron and standard Node apps.
## š¦ Installation
```bash
npm install text-observer
```
š Usage
```js
const { startSelectionObserver } = require('text-observer');
startSelectionObserver((selection, paste) => {
console.log('Text selected:', selection.text);
const processedText = selection.text.toUpperCase();
paste(processedText);
});
```
š„ Supported Platforms
macOS ā
Fully supported
Windows š” Coming soon