Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 4    Views: 59

Jake Chasan
Veteran developer
Profile
Posts: 1685
Reg: May 13, 2011
location unknow...
29,650
06/19/13 04:57 PM (12 years ago)

Prevent Copy and Paste with HTML

Hi All, How would I prevent copy and paste with the html doc plugin, but still allow the user to zoom into the document, highlight something, and click define? Jake
 
Arubaman
Aspiring developer
Profile
Posts: 636
Reg: Oct 20, 2011
Akron
16,910
like
06/19/13 05:22 PM (12 years ago)
ondragstart="return false" onselectstart="return false" may work, put in body tag
 
BuzzingSteve
Aspiring developer
Profile
Posts: 526
Reg: Jun 24, 2011
Vancouver, Cana...
11,660
like
07/19/13 02:33 PM (12 years ago)
@Jake. @Arubaman. Did this work for you within an HTML Doc plugin screen? Didn't work for me. Cheers
 
Jake Chasan
Veteran developer
Profile
Posts: 1685
Reg: May 13, 2011
location unknow...
29,650
like
07/26/13 07:07 AM (12 years ago)
No, the code that worked for me is pasting this in the <HEAD> of your HTML: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <style type="text/css"> * { -webkit-touch-callout: none; -webkit-user-select: none; /* Disable selecting or copying in UIWebView */ } </style> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jake
 
BuzzingSteve
Aspiring developer
Profile
Posts: 526
Reg: Jun 24, 2011
Vancouver, Cana...
11,660
like
07/26/13 11:48 AM (12 years ago)
Thanks Jake. Will give it a try. Cheers
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.