Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

electron-clipboard-ex

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-clipboard-ex

Extended electron.js clipboard module.

  • 1.3.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
74
decreased by-66.52%
Maintainers
1
Weekly downloads
 
Created
Source

electron-clipboard-ex

A node.js native addon designed to use with electron to extend its clipboard features.

Travis npm version

Example

Read file paths copied from macOS Finder or Windows explorer:

const clipboardEx = require('electron-clipboard-ex');
const filePaths = clipboardEx.readFilePaths();

Write file paths to clipboard:

const clipboardEx = require('electron-clipboard-ex');
clipboardEx.writeFilePaths(filePaths);

Clear clipboard:

const clipboardEx = require('electron-clipboard-ex');
clipboardEx.clear();

Save clipboard image as jpeg:

const clipboardEx = require('electron-clipboard-ex');
// sync
clipboardEx.saveImageAsJpegSync(targetPath, compressFactor);
// async
await clipboardEx.saveImageAsJpeg(targetPath, compressFactor);

Save clipboard image as png:

const clipboardEx = require('electron-clipboard-ex');
// sync
clipboardEx.saveImageAsPngSync(targetPath);
// async
await clipboardEx.saveImageAsPng(targetPath);

Put image into clipboard:

const clipboardEx = require('electron-clipboard-ex');
// sync
clipboardEx.putImageSync(imagePath);
// async
await clipboardEx.putImage(imagePath);

Check if clipboard has an image in it:

const clipboardEx = require('electron-clipboard-ex');
clipboardEx.hasImage();

Operating system support

This library supports Windows and macOS. Linux is currently not supported, feel free to open a pull request if you need it.

Keywords

FAQs

Package last updated on 06 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc