How to use the clipboard-polyfill/dist/text/clipboard-polyfill.text.js.writeText function in clipboard-polyfill

To help you get started, we’ve selected a few clipboard-polyfill examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github harvard-lil / capstone / capstone / static / js / case / sidebar.vue View on Github external
copyCiteToSelection() {
        // Copies: "Selected quotation" name_abbreviation, official_citation, ()
        // TODO: add pin cite to citation
        const toCopy = `"${this.selectedText}" ${this.templateVars.fullCite}`;
        clipboard.writeText(toCopy).then(
          () => this.copyStatus = "copied",
          () => this.copyStatus = "copy failed",
        );
      },
      elideOrRedactSelection(kind) {

clipboard-polyfill

A polyfill for the asynchronous clipboard API

MIT
Latest version published 7 months ago

Package Health Score

64 / 100
Full package analysis