Questions tagged [clipboard.js]

Clipboard.js is a modern approach to copy text to clipboard. It doesn't depend on Flash. It has no dependencies. And it's just 2kb gzipped.

Copying text to the clipboard shouldn't be hard. It shouldn't require dozens of steps to configure or hundreds of KBs to load. But most of all, it shouldn't depend on Flash or any bloated framework. That's why clipboard.js exists.

137 questions
2
votes
2 answers

How to make ClipboardJS copy text along with its hyperlink?

how to make ClipboardJS can copy text along with it's hyperlink? I already tried using data-link but no luck, clipboard.on('success', function(e) { var aff_link = $(this).attr('data-link'); }); this is what I already tried to make, and the…
2
votes
2 answers

vuejs2 copy clipboard issue

I am trying to use https://alligator.io/vuejs/vue-clipboard-copy/ for copy clip board feature in Vue.js, it is working fine for string but when I have an object, it is not copying properly. Below is the sample code.
Madasu K
  • 1,813
  • 2
  • 38
  • 72
2
votes
1 answer

Using clipboard.js with Yii2

I have installed the extension \supplyhog\ClipboardJs\ClipboardJsWidget which seemingly working fine. but I am struggling to make it work in gridview. as the code for the extension is already using a widget and gridview itself being a widget, so I…
Joshi
  • 2,730
  • 5
  • 36
  • 62
2
votes
0 answers

Clipboard.js Copy multiple elements with One Button Click

This is a new question but relates to this question. In short I am now able to copy a cell in a generated table to the clipboard. What I would like to do now is add more text to the clipboard using the same button. I have tried using the imperative…
Prof. Falken
  • 499
  • 6
  • 21
2
votes
4 answers

How to copy input's value with clipboard.js

I don't know how to copy the value to clipboard from the input without using ID! Here is JS: new Clipboard(".form__copy-btn", { target: function (trigger) { return $(trigger).closest(".form__field-wrapper").find("input"); } …
user7455781
2
votes
2 answers

How to use SweetAlert with clipboard.js library?

I'm trying to use SweetAlert with the clipboard.js library. I have tried simulating a click on a HTML button when the user confirm on SweetAlert, but it didn't work. Here is what I've tried to do: My HTML:
2
votes
2 answers

Individual tooltip when using multiple buttons with clipboard.js

I have a page with two textareas and two buttons that copy the content of each textarea respectively to the user's clipboard when pressed. When the button is pressed and the copying is successful, a tooltip shows saying Copied!. With how I had it…
user5368737
  • 793
  • 3
  • 12
  • 20
2
votes
2 answers

Copy URL from browser using clipboard.js

I am using the Accusoft document viewer. I have a requirement for a button that when clicked will copy to the clipboard the current URL plus a page number querystring parameter. I am using clipboard.js. I know exactly how to get the current URL and…
Michael Mahony
  • 1,310
  • 3
  • 15
  • 33
2
votes
1 answer

How can I wait for an ajax call to complete without using 'async: false' and without using callbacks?

I have the following TypeScript defining a KnockoutJS binding handler for a clickable element on my view: module MyModule { export interface ICopyButtonParams { dataUrl: string; } ko.bindingHandlers.copyButton = { init:…
aleonj
  • 163
  • 2
  • 7
2
votes
2 answers

Trigger clipboard.js parent

I am using the Clipboard.js plugin a website, and stuck with the issue selecting only parent class of the .copy button on-click. The problem is that I want the code inside pre tag to be copied with rich text formatting and the method I am using…
egurb
  • 1,176
  • 2
  • 14
  • 40
2
votes
2 answers

Copy to Clipboard is Not Working in safari

Below is my code to "copy to clipboard" everything is workingfine with except its not working on safari browser... please help