Skip to content

Native node addon that provides tools to manage the clipboard on macos and windows

Notifications You must be signed in to change notification settings

valudio/native-clipboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Native clipboard node module (Macos and Windows)

npm version

Native node addon that allows you to manage the clipboard. Mainly to be used with Electron.

Installation

This module is installed via npm:

npm install --save @valudio/native-clipboard

Usage

import nativeClipboard from '@valudio/native-clipboard'

API

nativeClipboard.getFromClipboard ()

Returns the current value on the clipboard.

const clipboardValue = nativeClipboard.getFromClipboard()

nativeClipboard.setToClipboard (value)

Sets a value on the clipboard.

nativeClipboard.setToClipboard('this is a test')
console.log(nativeClipboard.getFromClipboard()) // this is a test

nativeClipboard.setSelectionToClipboard ()

Set whatever is selected to the clipboard.

nativeClipboard.setSelectionToClipboard()

Supported OSes

  • Windows
  • macOS

License

MIT © Valudio

About

Native node addon that provides tools to manage the clipboard on macos and windows

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published