Questions tagged [paste]

The paste tag is to be used for issues relating to the paste portion of copy/paste operations.

Cut and paste and copy and paste offer user-interface paradigms for transferring text, data, files or objects from a source to a destination. The paste operation performs the copy to destination, whereas the source is often a clipboard. Often, hotkeys are employed to provide the paste functionality.

2546 questions
35
votes
6 answers

jquery how to get the pasted content

I have a little trouble catching a pasted text into my input: $('#myid').on('paste',function(){ console.log($('#myid').val()); }); console.log shows: default How I catch the pasted text and…
greenbandit
  • 2,267
  • 5
  • 30
  • 44
35
votes
4 answers

How to paste CSV data to Windows Clipboard with C#

What I'm trying to accomplish My app generates some tabular data I want the user to be able to launch Excel and click "paste" to place the data as cells in Excel Windows accepts a format called "CommaSeparatedValue" that is used with it's APIs so…
namenlos
  • 5,111
  • 10
  • 38
  • 38
33
votes
3 answers

How to paste on click? It works in google docs

I want to be able to initiate real paste event when user clicks. I can understand this may be a security issue, because if any webpage had access to users clipboard, that would be bad. So I thought all browsers disallow accessing clipboard data. But…
Tomas M
  • 6,919
  • 6
  • 27
  • 33
33
votes
6 answers

Looping over pairs of values in bash

I have 10 text files and I want to paste each file with its pair, such that I have 5 total files. I tried the following: for i in 4_1 5_1 6_1 7_1 8_1 do for j in 4_2 5_2 6_2 7_2 8_2 do paste ${i}.txt ${j}.txt > ${i}.${j}.txt done done However, this…
Rish
  • 794
  • 1
  • 6
  • 14
31
votes
10 answers

Clean Microsoft Word Pasted Text using JavaScript

I am using a 'contenteditable'
and enabling PASTE. It is amazing the amount of markup code that gets pasted in from a clipboard copy from Microsoft Word. I am battling this, and have gotten about 1/2 way there using Prototypes' stripTags()…
OneNerd
  • 6,442
  • 17
  • 60
  • 78
29
votes
9 answers

Why is pasting a long one-liner very slow in Vim's insert mode?

My Macbook was stuck yesterday, when I tried to paste 1200 lines of 80 characters to Vim. It was much faster to download the file, and not to paste the text. I have thought that this problem might be the reason, why internet operators allow slower…
Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
27
votes
7 answers

in R, can I stop print(cat("")) from returning NULL? and why does cat("foo") return foo>

If I enter print(cat("")) I get NULL I want to use cat() to print out the progress of an R script, but I don't understand why it is returning NULL at the end of all of my concatenated strings, and more importantly, how to get it to stop?
David LeBauer
  • 31,011
  • 31
  • 115
  • 189
26
votes
5 answers

javascript cut/copy/paste to clipboard: how did Google solve it?

Yes, this question has been asked again and again: how to copy and paste from and to the system clipboard with javascript? I have found only partial solutions and hacks so far. The reason that it has been asked so often in the past is that there…
Jos de Jong
  • 6,602
  • 3
  • 38
  • 58
25
votes
4 answers

Can't paste all text in wpf textbox

I have a simple window and textbox, when i try to paste this code to the textbox [Code]General : sample.avi Format : AVI Length : 380 MiB for 16mn 57s 320ms Video #0 : DivX 5 at 2994 Kbps Aspect :…
Programista
  • 1,037
  • 5
  • 15
  • 38
24
votes
2 answers

Explanation for sprintf("%03d", 7) functionality?

I am trying to write functions in R where the aim is to read multiple .csv files. They are named as 001.csv, 002.csv, ... 332.csv. With paste I managed to construct names 1.csv, 2.csv and so on, but I'm having difficulty with adding leading zeroes.…
user3592253
  • 261
  • 1
  • 2
  • 3
24
votes
5 answers

Paste a HTML table into Excel, how to keep the line break in cell

I have a simple html table, for example, just one cell, but when I copy the dom node, and paste it into excel, it will be recognize as two rows, How to make Excel get the correct paste data.
1
2
I tried to add…
virsir
  • 15,159
  • 25
  • 75
  • 109
22
votes
5 answers

selecting in visual mode to paste outside vim window

I need to paste some selected block in visual mode to outside of vim. Currently I need to select this block manually from mouse to paste outside of vim. As selecting texts in visual mode is easier ,it would be efficient to select some text for…
shampa
  • 1,350
  • 3
  • 13
  • 22
22
votes
5 answers

How do you copy/paste from the clipboard in C++?

I'm still a C++ newbie who has only recently learned some file manipulation. I looked it up online and the codes given are way beyond my current skill. Is there a simple way to do this, or are there any good tutorials that can explain this from the…
user808066
22
votes
7 answers

Copy from browser paste to netbeans not working

Copy from browser paste to netbeans not working. How could this be happen? When I try to paste notepad, it is working, but when try to netbeans it is not working? I am in shock
devrim
  • 307
  • 1
  • 3
  • 8
22
votes
4 answers

Split a character vector into individual characters? (opposite of paste or stringr::str_c)

An incredibly basic question in R yet the solution isn't clear. How to split a vector of character into its individual characters, i.e. the opposite of paste(..., sep='') or stringr::str_c() ? Anything less clunky than this: sapply(1:26, function(i)…
smci
  • 32,567
  • 20
  • 113
  • 146