@valudio/native-clipboard
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

Native clipboard node module (Macos and Windows)

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

Readme

Keywords

none

Package Sidebar

Install

npm i @valudio/native-clipboard

Weekly Downloads

2

Version

0.0.1

License

MIT

Unpacked Size

293 kB

Total Files

5

Last publish

Collaborators

  • valudio