Questions tagged [clipboarddata]

Questions dealing with editing and using clipboard data.

Questions dealing with editing and using clipboard data. eg: Storing a string in the Windows clipboard.

165 questions
6
votes
5 answers

How to add/get image data in the OS clipboard using Python?

I have some Python code that edits image files and would like to know how to add image data to the Operating System clipboard and get it from there. When searching for a cross-platform solution to replace or get clipboard text in Python, there were…
Edward
  • 1,062
  • 1
  • 17
  • 39
5
votes
1 answer

How to avoid page scroll in mobile browsers when doing a copy to clipboard

I am trying to do a copy to clipboard action by using below code, and the code works fine in desktop browsers but when it comes to mobile browsers like IOS safari/chrome the page scrolls down at $temp.val(copydatacode).select(); …
krish kr
  • 857
  • 1
  • 6
  • 7
5
votes
0 answers

Copy binary data to clipboard via Javascript

Is it possible to put binary data in the clipboard with a specific data flavor? Even a subset of browsers with hacks is okay. In this case, the specific goal is copying an Office object, which is a ZIP file containing XML and other embedded files,…
prototype
  • 7,249
  • 15
  • 60
  • 94
5
votes
1 answer

HTML5 and JavaScript: How do I make paste handling fully/more asynchronous?

I'm implementing copy-paste functionality into a browser application using the ClipboardData API, as explained in this answer. The FileReader::readAsDataURL(blob) provides asynchronous reading of the file data, which is great. var items =…
tmpearce
  • 12,523
  • 4
  • 42
  • 60
5
votes
1 answer

Clearing Clipboard Data in Android

I'm trying to clear the Clipboard data in android as follow but its not clearing it. ClipboardManager clipman = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE); clipman.setPrimaryClip(null); Any ideas ?
Radhakrishna Rayidi
  • 510
  • 2
  • 9
  • 24
4
votes
1 answer

When I "copy" a file where do I retrieve the file name and path?

I'm currently working on a react/electron app and I want to be able to copy a file that's outside the app (could be any file type) using ctrl+c or right click copy. How can I retrieve that file's name and path inside my app? I've tried…
4
votes
1 answer

How do I get a list of all data from clipboard history in C#?

I want to get a list of all data from the clipboard history but I can't find an enumerator method. Would there be something I'm missing or what other way can I do it? I can't find an enumerator method in the clipboard class. var clip =…
Wes
  • 1,847
  • 1
  • 16
  • 30
4
votes
2 answers

Javascript Clipboard SetData Error in Mozilla

I want to copy image programmatically. I have used executeCommand('copy')which was not working so I override copy listener by document.addEventListener('copy', modifyCopy); In modifyCopy function I convert base64 encoded string to blob url and set…
Muhammad Ramzan
  • 342
  • 3
  • 16
4
votes
1 answer

Paste document files in javascript

I'd like to paste file to server from client desktop using javascript. So I added a listener on paste event: document.addEventListener('paste', function(e) { var files = {}; if(window.clipboardData){ // IE files =…
Seric
  • 129
  • 7
4
votes
2 answers

Ng-Paste - Accessing Pasted Data as an Array or List

The Idea We're building an app in Angular 1.5.x and we're trying to implement a feature that would allow the user to paste a single column of cells from an excel sheet or any other spreadsheet (single column, any number of rows deep) into an…
M. Irvin
  • 143
  • 1
  • 13
4
votes
1 answer

How to put an image to clipboard in Javascript?

How to put image to clipboard using Javascript (in handler of copy event) as if it would by done by right click on image in browser and selecting "Copy Image" from context menu. This script shows details of clipboard content. For copied image it…
czerny
  • 15,090
  • 14
  • 68
  • 96
4
votes
1 answer

Decimal precision when copy excel numbers to clipboard

I'm writing a MatLab programm under windows 7 x64 that takes the clipboard, with mixed data copied from Microsoft Excel, and import it directly to MatLab into a single char array. When I use str = clipboard('paste') in MatLab, all text data copied…
Transfinito
  • 171
  • 3
  • 13
3
votes
2 answers

Clipboard opening failed

I am having a problem regarding clipboard and I get this error message every time I try to make a copy / paste operation from an Excel file. The code breaks at Clipboard.GetDataObject() and the message error is this: OpenClipboard Failed (Exception…
3
votes
0 answers

Access local Outlook running on client from a RemoteApp running on that client

My program allows users to copy/paste whole emails from their Outlook client into my software. If my program runs as a local program I can basically us the following code to access the running Outlook instance and continue code logic from there: Dim…
Gorion
  • 31
  • 1
3
votes
0 answers

There is a workaround for getting clipboard data on Android 10 and above

According to this answer: Can't get clipboard information on Android 10 there is no way to get the clipboard data, on Android 10 and above, unless your app is the default input method editor (IME) or is the app that currently has focus. However I…
1
2
3
10 11