clipboard

Cross-browser method to prevent all methods of text copying from a textarea?

牧云@^-^@ 提交于 2019-12-01 17:36:21
问题 I am working on an online typing software. In the typing software, all is going well but I have the problem of dishonest users who might possibly type the text into the textarea, copy it, then reload the page (therefore resetting the timer) and pasting it in straightaway. So I was thinking along the lines of using something like evt.preventDefault(); when javascript detects the pressing of the ctrl / cmd button along with the C key. But then I realized that the user could always go up to the

Getting binary data directly off the windows clipboard

夙愿已清 提交于 2019-12-01 16:14:03
I've been beating my head against the desk for about an hour now just trying to find some way of getting say... an array of bytes off the clipboard. Instead, all I can seem to find is information on how to get plain text from the clipboard... that's not helpful at all. I've tried following this: Java getting bytes of clipboard I've also tried following this: http://mrbool.com/manipulating-clipboard-content-with-java/24758 Every time I run into the silly DataFlavor being "unsupported". Surely there's just something simple that I'm missing here... I mean... how can it support plain text, images,

iOS 9 UIPasteboard won't work in the background

余生长醉 提交于 2019-12-01 15:44:49
iOS 9's [UIPasteboard generalPasteboard].string will become null when the app is in the background running a background task or Today widget. Can't we retrieve a clipboard text in the background any more? Can you explain where do you launch generalPasteboard?. This is what I would do: In your app delegate's applicationdidBecomeActive method put in this code: [[NSNotificationCenter defaultCenter] postNotificationName:@"appDidBecomeActive" object:nil]; Next , in your current active view controller's init method subscribe to the notification. [[NSNotificationCenter defaultCenter] addObserver:self

navigator.clipboard is undefined

ε祈祈猫儿з 提交于 2019-12-01 15:29:53
问题 Why is navigator.clipboard always undefined in the following snippet? var clipboard = navigator.clipboard; if (clipboard == undefined) { console.log('clipboard is undefined'); } else { clipboard.writeText('stuff to write').then(function() { console.log('Copied to clipboard successfully!'); }, function() { console.error('Unable to write to clipboard. :-('); }); } More on the clipboard API can be found here. Chrome Version: 68.0.3440.106. I'm sure this was working at some point, but no longer

Getting binary data directly off the windows clipboard

狂风中的少年 提交于 2019-12-01 15:25:16
问题 I've been beating my head against the desk for about an hour now just trying to find some way of getting say... an array of bytes off the clipboard. Instead, all I can seem to find is information on how to get plain text from the clipboard... that's not helpful at all. I've tried following this: Java getting bytes of clipboard I've also tried following this: http://mrbool.com/manipulating-clipboard-content-with-java/24758 Every time I run into the silly DataFlavor being "unsupported". Surely

Copy image to clipboard in android

走远了吗. 提交于 2019-12-01 15:09:23
I want to copy image to clipboard for all level of apis. For this i have found an answer from the below link http://developer.android.com/guide/topics/text/copy-paste.html But it does supports from api level 11. But I want to do same functionality in lower versions (less then of api level 11) also. ClipboardManager is working in all the versions but ClipData, ClipData.Item, and ClipDescription are not working in lower versions. So is there any way to do copy image to clipboard. And also I want to copy image from my application and paste it into another application like in compose message. Is

Convert BMP to PNG in memory for Clipboard pasting in .Net

喜夏-厌秋 提交于 2019-12-01 14:57:49
This similar question's answers all require the file to be saved. However, I'm trying to convert the file and then copy it to the clipboard. How can I convert a Bitmap (or any image) to a PNG without saving it to the file system? Update: I'm trying to paste the image into an application (in this case Evernote). When you copy an image into the clipboard (e.g. via the browser), it remembers its image format and when you paste it in, it will create an image with the same exact format. For example, if you copy a PNG, it will paste a PNG. If you copy a JPG, it will paste a JPG, etc. I am trying to

Copy image to clipboard in android

自闭症网瘾萝莉.ら 提交于 2019-12-01 14:49:24
问题 I want to copy image to clipboard for all level of apis. For this i have found an answer from the below link http://developer.android.com/guide/topics/text/copy-paste.html But it does supports from api level 11. But I want to do same functionality in lower versions (less then of api level 11) also. ClipboardManager is working in all the versions but ClipData, ClipData.Item, and ClipDescription are not working in lower versions. So is there any way to do copy image to clipboard. And also I

iOS 9 UIPasteboard won't work in the background

谁都会走 提交于 2019-12-01 13:49:07
问题 iOS 9's [UIPasteboard generalPasteboard].string will become null when the app is in the background running a background task or Today widget. Can't we retrieve a clipboard text in the background any more? 回答1: Can you explain where do you launch generalPasteboard?. This is what I would do: In your app delegate's applicationdidBecomeActive method put in this code: [[NSNotificationCenter defaultCenter] postNotificationName:@"appDidBecomeActive" object:nil]; Next , in your current active view

Convert BMP to PNG in memory for Clipboard pasting in .Net

我怕爱的太早我们不能终老 提交于 2019-12-01 13:44:29
问题 This similar question's answers all require the file to be saved. However, I'm trying to convert the file and then copy it to the clipboard. How can I convert a Bitmap (or any image) to a PNG without saving it to the file system? Update: I'm trying to paste the image into an application (in this case Evernote). When you copy an image into the clipboard (e.g. via the browser), it remembers its image format and when you paste it in, it will create an image with the same exact format. For