JSPM

  • Created
  • Published
  • Downloads 18
  • Score
    100M100P100Q65028F
  • License MIT

Cross-platform (Mac/Win) library to get OS-level text selection, process it, and paste automatically.

Package Exports

  • textwrench-observer
  • textwrench-observer/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (textwrench-observer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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

npm install text-observer

🛠 Usage

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