Clipboard

Contents

Clipboard management plugin for Cordova that supports iOS, Android, and Windows Phone 8.

Installation

ionic cordova plugin add cordova-clipboardnpm install @ionic-native/clipboard
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More or Contact Us
ionic enterprise register --key=YOURPRODUCTKEYnpm install @ionic-enterprise/clipboard

Supported Platforms

  • Android
  • iOS
  • Windows Phone 8

Usage

import { Clipboard } from '@ionic-native/clipboard/ngx';

constructor(private clipboard: Clipboard) { }

...


this.clipboard.copy('Hello world');

this.clipboard.paste().then(
   (resolve: string) => {
      alert(resolve);
    },
    (reject: string) => {
      alert('Error: ' + reject);
    }
  );

this.clipboard.clear();