Questions tagged [clipboard]

The clipboard is a software facility that can be used for short-term data storage and/or data transfer between documents or applications, via copy and paste operations.

It is most commonly a part of a GUI environment and is usually implemented as an anonymous, temporary block of memory that can be accessed from most or all programs within the environment via defined programming interfaces. A typical application accesses clipboard functionality by mapping user input (keybindings, menu selections, etc.) to these interfaces.

The semantics of the clipboard facility varies from one operating environment to another, and can also vary between versions of the same system. They can sometimes be changed programmatically or by user preference. This can lead to user frustration when switching between environments with different clipboard semantics particularly as copy and paste operations often become embedded in the user's muscle memory.

Most environments support a single clipboard transaction. Each cut or copy overwrites the previous contents. Normally, paste operations copy the contents, leaving the contents available in the clipboard for further pasting operations.

http://en.wikipedia.org/wiki/Clipboard_(software)

4050 questions
55
votes
8 answers

How to handle a blocked clipboard and other oddities

Over the course of the last couple of hours I have been tracking down a fairly specific bug with that occurs because another application has the clipboard open. Essentially as the clipboard is a shared resource (as per "Why does my shared clipboard…
Richard Slater
  • 6,313
  • 4
  • 53
  • 81
54
votes
7 answers

Prevent Vim from clearing the clipboard on exit

When I open Vim from a terminal, copy some text to the system clipboard, and exit Vim, the system clipboard gets cleared. How to keep the copied text in the clipboard?
Thanos
  • 771
  • 7
  • 10
52
votes
12 answers

Copy text string on click

I want to to be able to copy a text string on click without a button. The text string will be inside a "span" class. User hovers over text string User clicks text string Text string is copied to clipboard
Matthew
  • 607
  • 2
  • 6
  • 12
50
votes
11 answers

Copy image to clipboard

Seemingly, you can't (yet) programmatically copy an image to the clipboard from a JavaScript web app? I have tried to copy a text in clipboard , and it's worked. Now I would like to copy an image and after I press ctrl+v to paste into Word or Excel…
rachedbchir
  • 511
  • 1
  • 4
  • 4
49
votes
2 answers

Copy clipboard function working locally but not working server

I am using the below script: It is working locally in visual studio. but in server it throws "Cannot read property 'write text' of undefined" function GetCopyText(thislink) { var Content =…
Daniel Stephen
  • 539
  • 1
  • 5
  • 10
49
votes
3 answers

How does Copy Paste of formatted text work?

I'm confused about what implements the functionality of copy and paste. This is exactly what I'm confused with: When I copy formatted text from MS Word (which uses a different markup language than HTML) and paste into an RTF editor in a web browser…
claws
  • 52,236
  • 58
  • 146
  • 195
48
votes
7 answers

Can python send text to the Mac clipboard

I'd like my python program to place some text in the Mac clipboard. Is this possible?
David Sykes
  • 48,469
  • 17
  • 71
  • 80
47
votes
10 answers

How can I copy to the clipboard the output of a cell in a Jupyter notebook?

How can I copy to the clipboard the output of a cell in a Jupyter notebook, without having to select it with drag-and-drop?
Franck Dernoncourt
  • 77,520
  • 72
  • 342
  • 501
46
votes
2 answers

How does X11 clipboard handle multiple data formats?

It probably happened to you as well - sometimes when you copy a text from some web page into your rich-text e-mail draft in your favorite webmail client, you dislike the fact that the pasted piece has a different font/size/weight.. it somehow…
mykhal
  • 19,175
  • 11
  • 72
  • 80
45
votes
8 answers

Copy to clipboard with jQuery/js in Chrome

I know this kind of question has been asked here for many times, including: How do I copy to the clipboard in JavaScript? or How to copy text to the client's clipboard using jQuery?, I'm narrowing the scope: Condition: works fine in Google Chrome…
Sam Su
  • 6,532
  • 8
  • 39
  • 80
45
votes
4 answers

How do I monitor clipboard content changes in C#?

I want to have this feature in my C# program: When the user do Ctrl + C or Copy anywhere (i.e. when the clipboard content changes), my program will get notified, and check whether the content met certain criteria, if so, become the active program,…
Weiming
  • 929
  • 1
  • 10
  • 13
42
votes
6 answers

How to copy to clipboard using Access/VBA?

Using VBA inside Access2003/2007. How to copy the contents of a string variable to the clipboard? This site recommends a creating a zero length TextBox, copying the string to the TextBox, then running DoCmd.RunCommand acCmdCopy. Ugh. I mean, we may…
hawbsl
  • 15,313
  • 25
  • 73
  • 114
42
votes
7 answers

Import assignment cannot be used when targeting ECMAScript 2015 modules

I'm trying to use the follwing line: import Clipboard = require('clipboard'); and I get the following error: [default] c:\xampp\htdocs\isitperfect\node_modules\angular2-clipboard\src\clipboard.directive.ts:2:0 Import assignment cannot be used…
TheUnreal
  • 23,434
  • 46
  • 157
  • 277
41
votes
6 answers

Copy current URL to clipboard

Not sure why this has been so difficult for me today, but for some reason I cannot seem to get it to copy the current URL to the clipboard. Overall, I'm looking for a way to do it without needing to create some hidden text elements. This is what I'm…
ultraloveninja
  • 1,969
  • 5
  • 27
  • 56
41
votes
3 answers

echo "string" | xclip -selection clipboard , copies the 'string' but also adds a new line to it. how to fix this?

this is the command responsible for adding a new line to the string echo "string" | xclip -selection clipboard
user2453554