universal-clipboard
TypeScript icon, indicating that this package has built-in type declarations

1.3.0-1 • Public • Published

universal-clipboard npm

clipboard ability to achieve.

Support

browser weex miniApp wechatMiniprogram quickApp

Install

$ npm install universal-clipboard --save

Usage

import Clipboard from 'universal-clipboard';
 
// How to use it in quickapp
// import Clipboard from 'universal-clipboard/lib/quickapp;
 
Clipboard.readText().then(text => {
 
}).catch(() => {
 
});
 
Clipboard.writeText('text').then(() => {
 
}).catch(() => {
 
});

Methods

readText(): Promise.<text>

Get clipboard value.

Support

weex miniApp wechatMiniprogram quickApp

Arguments

Property Type Description Default
text string get clipboard value -

writeText(text: string): Promise.<>

Set clipboard value.

Support

browser weex miniApp wechatMiniprogram quickApp

Arguments

Property Type Description Default
text string set clipboard value -

/universal-clipboard/

    Package Sidebar

    Install

    npm i universal-clipboard

    Weekly Downloads

    6

    Version

    1.3.0-1

    License

    BSD-3-Clause

    Unpacked Size

    40.3 kB

    Total Files

    61

    Last publish

    Collaborators

    • zeroling
    • rax-publisher