7

I have used ZeroClipboard J-Query plug-in for copy to clipboard in web browsers which uses Flash. As for browser security reasons, copying is disallowed and we need Flash. But the ZeroClipboard copy functionality does not work in mobiles like iPhone, Android or iPad as we can't use flash there.

So is how to implement Copy to Clipboard functionality in mobiles like iPhone, Android or iPad ?

Possible Duplicate for this question is - Copy to Clipboard that also works on Mobile?

As there are not enough satisfying answers, I am posting this question again.

Thanks.

Community
  • 1
  • 1
user1638279
  • 503
  • 2
  • 9
  • 25
  • check this: https://developer.mozilla.org/en-US/docs/Web/API/ClipboardEvent.clipboardData and http://msdn.microsoft.com/en-us/library/ie/ms535220(v=vs.85).aspx – Omar Feb 18 '14 at 12:49
  • @Omar That seems to be good one which will work without flash and also in mobiles. I will try them and reply the result. – user1638279 Feb 18 '14 at 13:03
  • It's supported by mobile browsers, good luck. – Omar Feb 18 '14 at 13:05
  • @Omar Yes I hope it will work for both mobiles browsers and other normal browsers. But its showing this is an editor's draft and an experimental technology . Is it still safe to use ? I mean if new version comes out, then surely I need to update my current API. – user1638279 Feb 18 '14 at 13:14
  • Well, you definitely need to test code on different platforms and keep an eye on any update. – Omar Feb 18 '14 at 13:15
  • @Omar yes. Thanks a lot. – user1638279 Feb 18 '14 at 13:16
  • For those who want to visit directly to W3C copy to clipboard API - http://dev.w3.org/2006/webapi/clipops/clipops.html#widl-ClipboardEvent-clipboardData – user1638279 Feb 18 '14 at 13:17
  • possible duplicate of http://stackoverflow.com/questions/400212/how-do-i-copy-to-the-clipboard-in-javascript - there are several things you can do without Flash, such as preselecting a text and encouraging people to press ctrl+c (or otherwise perform copy action themselves). There is also document.exectCommand('copy') which is supported by many browsers – qbolec Aug 17 '15 at 11:21

2 Answers2

2

There's not really a way to copy to the clipboard on iOS Devices from a web browser.

-2

Yes it will works If the Adobe Flash&JavaScript is supported in your phone browser. Maybe flash has been disabled because of security reasons. Try downloading newer version of adobe flash for your phone.

majicson
  • 11
  • 1