Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
166 views

I have up to four form text inputs that I'm trying to get copied to the windows clipboard as individual entries. Using navigator.clipboard.writeText it will successfully copy any one entry, but ...
TheOtherBubba's user avatar
1 vote
1 answer
191 views

I'm trying to make an HTML element where, when clicked, copies some text to the clipboard. I was originally using the Clipboard API, but it doesn't work. Does anybody know how I can do a similar thing ...
professorKamel's user avatar
0 votes
0 answers
42 views

I'm using the Clipboard API to copy styled HTML content with leading spaces into Microsoft PowerPoint, and I found that using a combination of   and mso-spacerun:yes works well — except for ...
Gykonik's user avatar
  • 706
1 vote
1 answer
98 views

I'm using the Clipboard API to copy styled HTML content to the clipboard. When pasting into Microsoft PowerPoint, I want to retain leading spaces for formatting purposes. However, PowerPoint trims ...
Gykonik's user avatar
  • 706
0 votes
1 answer
443 views

I'm using the following code to check if the the navigator has permission to write to the clipboard: window.onload = () => { navigator.permissions.query({ name: 'clipboard-write' }).then((...
guizo's user avatar
  • 3,245
1 vote
0 answers
127 views

Trying to copy a Canvas content to the Clipboard within a button click event handler canvas.toBlob( blob => { navigator.clipboard.write([new ClipboardItem({'image/png': blob})]) } ) works well on ...
Fabio Fidanza's user avatar
0 votes
0 answers
60 views

My exact requirement is I want to disable the printscreen option for the user. I found one of the solution to disabling the printscreen.But some methods are deprecated and looking for the working ...
KKR's user avatar
  • 1
0 votes
1 answer
625 views

I am trying to integrate a basic, "copy to clipboard" function with Rainbow syntax highlighting library. Each code snippet on the page receives highlighting and can be copied to the ...
jottin's user avatar
  • 581
2 votes
0 answers
679 views

Is it possible to open a new browser tab after content has been copied into the clipboard? Currently I'm getting Uncaught (in promise) DOMException: Document is not focused. which I take it that I can'...
Markus's user avatar
  • 452
3 votes
1 answer
2k views

Im trying create "copy" button for using clipboard in different apps. I'm expect that: ctrl+v in simple text editor will create plain text ctrl+v in RTF (or in app with "link" ...
Kirill's user avatar
  • 192
0 votes
2 answers
95 views

I have written a short JavaScript function to write a link to the clipboard so that it will still appear as a clickable link when pasted into programs that support rich text such as Microsoft Word, ...
ljdyer's user avatar
  • 2,126
3 votes
1 answer
437 views

I wont to simulate paste event trough javascript as shown on snipped below <!DOCTYPE html> <html> <body> <div class="col-xs-10 col-md-9 col-lg-8 form-field ...
Habibillah's user avatar
  • 28.8k
4 votes
1 answer
1k views

TL;DR Is it possible to get the Clipboard API to write text from the result of an Axios get request in Safari even when the writeText() is a direct result of a user event? Long version I have an ...
evans863's user avatar
2 votes
0 answers
300 views

Example: <!DOCTYPE html> <html> <body> <script> setInterval(myFunction, 1000); function myFunction() { window.focus() navigator.clipboard.readText() } </script> &...
James Ronald's user avatar
0 votes
2 answers
2k views

I'm creating a color palette where I have a clipboard icon within a Tooltip component next to each color. On click it will copy the color's name onto the user's clipboard. When that happens, the ...
user avatar
1 vote
0 answers
740 views

I have a simple Web-application (written in Google Apps Script using the HtmlService) When a user clicks a button, it used to "paste" whatever text is on the clipboard to an input field. ...
Jasper Cuvelier's user avatar
7 votes
3 answers
7k views

Getting the error error TS2304: Cannot find name 'ClipboardItem' when trying to create a ClipboardItem for navigator.clipboard.write(). const clipboardItemInput = new ClipboardItem({'image/png' : ...
sadasmita biswal's user avatar
2 votes
1 answer
1k views

I want to modify the clipboard so that it becomes the regex match. And that works - as long as I use Ctrl+C or just "Copy". If I click on "Copy link address" (or "Copy link location"), the event ...
retiredgoblin's user avatar
1 vote
1 answer
3k views

I am building out my first Google Chrome Extension and want to create something that can read and write to the system clipboard. I am currently putting all the js in a script imported by the popup....
srac1777's user avatar
14 votes
2 answers
4k views

The Problem I am building a Jekyll site with the minima theme to publish some tutorial online. The tutorial pages contain many code snippets, for example: ```javascript /* Global scope: this code is ...
Adam Matan's user avatar
  • 138k