Native node addon that allows you to manage the clipboard. Mainly to be used with Electron.
This module is installed via npm:
npm install --save @valudio/native-clipboard
import nativeClipboard from '@valudio/native-clipboard'Returns the current value on the clipboard.
const clipboardValue = nativeClipboard.getFromClipboard()Sets a value on the clipboard.
nativeClipboard.setToClipboard('this is a test')
console.log(nativeClipboard.getFromClipboard()) // this is a testSet whatever is selected to the clipboard.
nativeClipboard.setSelectionToClipboard()- Windows
- macOS