nativescript-clipboard

1.1.7 • Public • Published

NativeScript Clipboard

NPM version Downloads Twitter Follow

A NativeScript plugin to copy and paste data from and to the device clipboard.

Installation

Run the following command from the root of your project:

tns plugin add nativescript-clipboard

Usage

To use this plugin you must first require() it:

var clipboard = require("nativescript-clipboard");

setText

  clipboard.setText("Something relevant to put on the clipboard.").then(function() {
      console.log("OK, copied to the clipboard");
  })

getText

  clipboard.getText().then(function(content) {
      console.log("Read from clipboard: " + content);
  })

Future work

Implement support for storing data (image, etc) on the clipboard. Open an issue or PR in case you like to have that.

install

npm i nativescript-clipboard

Downloadsweekly downloads

117

version

1.1.7

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability