Wednesday, 15 May 2013

jquery - How to click on an element and use javascripts "copy" event to add to the clipboard -



jquery - How to click on an element and use javascripts "copy" event to add to the clipboard -

javascript has "copy" event , no longer have utilize flash! (well, still should utilize flash fallback).

http://dev.w3.org/2006/webapi/clipops/#x3.1.1-copy-event

i'm trying figure out how to: click on anchor tag (copy) , copies (text input src /or innerhtml) clipboard. here's fiddle of html/css http://jsfiddle.net/lkuhm/

can guide me?

:::::html:::::

<div> <ul> <li><input type="text" class="input" value="this next copied!" /><a href="#" id="copy" class="copy">copy!</a></li> <li><input type="text" class="input" value="this next copied!" /><a href="#" id="copy" class="copy">copy!</a></li> <li><input type="text" class="input" value="this next copied!" /><a href="#" id="copy" class="copy">copy!</a></li> <li><input type="text" class="input" value="this next copied!" /><a href="#" id="copy" class="copy">copy!</a></li> </ul> <textarea></textarea>

you're looking @ old version of spec. new 1 here: http://www.w3.org/tr/clipboard-apis/ according current spec, cannot programmatically simulate of these clipboard events. trying work appropriate w3c working grouping changed @ to the lowest degree allow simulation when user clicks and/or issues keyboard event (just how can write access clipboard flash).

javascript jquery copy clipboard

No comments:

Post a Comment