Skip to main content

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.

clipboard.js
0 votes
1 answer
61 views

ClipboardJS - copy data from `data-clipboard-text` held in a separate element

In this snippet, I am using Clipboard.js to copy text from the a element, copying the data held in the data-clipboard-text attribute. That works fine as shown here: <!DOCTYPE html> <html ...
4532066's user avatar
  • 2,110
0 votes
1 answer
122 views

Dealing with the deprecated `document.queryCommandSupported`

I have trouble running vitest (in the "happy-dom" environment) for UI code that uses the deprecated document.queryCommandSupported function. This deprecated function is being used by the ...
Lemour's user avatar
  • 181
1 vote
3 answers
205 views

Trying to create a "copy" button for my website, isn't working

`Backstory: I'm making a simple bibliography website and am struggling on the copy button. Even after using clipboardjs, the copy feature of the button isn't working. I got so desperate to where I ...
Varun Nukala's user avatar
1 vote
1 answer
233 views

How change icon on a button dynamically with JavaScript after 2 seconds when clicked?

The main purpose of my script is to announce that the copy of the text has been successfully completed. When I click on the button, the first icon change was ok, as is the toast display, and the text ...
Machou's user avatar
  • 171
0 votes
2 answers
83 views

Copy to Clipboard HTML a tag with href attached

I am creating a URL shortener as a personal project and I am attempting to make a copy button that when clicked copies the shortened URL with the attached hyperlink. The URL shortening is handled with ...
user16052347's user avatar
0 votes
1 answer
211 views

Copy Text and Image using clipboard in JS

I am trying to copy an image with a text and paste to slack. It works when i try to copy it to notepad but wont work when i copy the same to slack. JS code : const btn = document.getElementById("...
Roy Mathew's user avatar
2 votes
3 answers
144 views

How can i provoke a revaluation of a react component when user copies something on their ClipBoard?

I am trying to build a component with some validations depending on user's clipboard. import { useState } from 'react' export default function useCopiedFromClipboard() { const [copiedData, ...
Konstantinos Alexis's user avatar
0 votes
2 answers
241 views

Copy to Clipboard without space or break lines

I am trying to develop a "copy" button to copy numbers from a multi input form to the clipboard. I installed Clipboard.js and, point the id to the <form> element so, everything works ...
Freddan's user avatar
  • 82
0 votes
0 answers
61 views

Question about "replace()" and clipboard in Javascript

I am using replace() to replace the bullet points in a text field. It shows up correctly in the console.log but when I use the end function to copy and paste the string into a new text field, it ...
Urbanus1234's user avatar
0 votes
1 answer
726 views

android WebView: copy to clipboard [https://poe.com]

'So I converted [https://poe.com] into android app.but when I copy text inside the app I get error message clipboard error message .' public class MainActivity extends AppCompatActivity { WebView ...
user18211373's user avatar
5 votes
1 answer
4k views

How do I read the clipboard with blazor?

I am using a Blazor Server application that have a screencasting feature. My goal is to get the data from clipboard and I am talking about not only a text which is easy but overall some img, files, ...
George Korolev's user avatar
0 votes
1 answer
148 views

TypeError: Clipboard.on is not a function

I am testing my clipboard tooltip code, but when I run the test it gives the error TypeError: Clipboard.on is not a function Test File let clipboard_args; class Clipboard { constructor(...args) {...
Deekshith Shetty's user avatar
0 votes
2 answers
595 views

Copy to Clipboard for Larvel Orchid Column

I have a question if someone else was in this kind of situation maybe they have a solution, for Laravel Orchid im trying to make a Copy to Clipboard Button for the Column Name with the clipboard.js. I ...
Jaba's user avatar
  • 109
0 votes
2 answers
400 views

Text is no copying by clipboard.js

I'm trying to copy text using clipboard.js but it's not copying. here's my code $(document).ready(async function () { var html = '' var script = '<script>' let response = await ajax('...
Usama Javed's user avatar
0 votes
0 answers
144 views

Nuxt content v1 override markdown renderer components

Problem: I am looking for a way to have a little bit more control over nuxt-content (v1) markdown renderer. To be more specific looking for add copy button / title to rendered code blocks with some ...
Mimayuki's user avatar
  • 127

15 30 50 per page
1
2 3 4 5
10