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

    0.0.6 • Public • Published

    Nuxt Clipboard

    Latest Version on NPM Software License npm npm

    A "copy to clipboard" module for Nuxt.js using vue-clipboard2

    ♻️ Setup

    • Add nuxt-clipboard dependency using yarn or npm to your project
    • Add nuxt-clipboard to modules section of nuxt.config.js
    export default {
        modules: [
            // simple usage
            'nuxt-clipboard',
            // with options
            ['nuxt-clipboard', { autoSetContainer: true }]
        ],
        clipboard: {
            autoSetContainer: true
        }
    }

    🔥 Usage

    You can use $copyText in almost any context using app.$copyText or this.$copyText (Including store actions).

    See vue-clipboard2 official docs for more usage information.

    export default {
        methods: {
            async copySomething(text) {
                try {
                    await this.$copyText(text);
                } catch (e) {
                    console.error(e);
                }
            },
        },
    };

    License

    The MIT License (MIT)

    Copyright (c) Chantouch Sek

    Install

    npm i nuxt-clipboard

    DownloadsWeekly Downloads

    1,528

    Version

    0.0.6

    License

    ISC

    Unpacked Size

    6.19 kB

    Total Files

    15

    Last publish

    Collaborators

    • chantouchsek