State of the art in Copy to Clipboard feature (My investigations)

Flash alternative

HTML5 alternative

There is an API in draft to standardize clipboard events, but is not implemented in any browser for the moment http://dev.w3.org/2006/webapi/clipops/

My Rails/Zclip implementation

I'm using zclip (based on zeroclipboard) to copy text from a restfule service to the system clipboard:

$('.copy-to-clipboard').zclip
  path:'/ZeroClipboard.swf'
  setHandCursor: true
  copy: -> 
    ajaxReturn = $.ajax
     type: 'GET'
     async: false
     url: '/resources/copy_to_clipboard/' + $(this).attr("class").match(/[0-9]+/)
    return ajaxReturn.responseText

It's coffeescript.

If the service (/resources/copy_to_clipboard/) serves text it's copied right. But if it servers a DOCX file, it doesn't copy right to the clipboard. Take a look at the rails controller:

  def copy_to_clipboard
    send_file @resource.resource_content.content.file.file, :type =&
Edit
Report