Skip to content
rails plugin to provide click_to_copy_text_field helper
JavaScript Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
javascript
lib
swf
tasks
test
MIT-LICENSE
README
Rakefile
init.rb
install.rb
uninstall.rb

README

ClickToCopyTextfield
====================

click textfield to copy to clipboard, note that this plugin requires jQuery (or jrails).

This uses the Clipboard 2.0 jQuery plugin [http://plugins.jquery.com/project/clipboard]

This probably won't work with Flash 10 as Adobe has changed permissions in Flash. The author of jQuery Clipboard plans to fix it for Flash 10. In the meantime, you can use this instead for click to copy: http://github.com/mojombo/clippy/tree/master

Example
=======

in your view or layout, include the javascript:
<%= javascript_include_tag 'jquery.clipboard.min.js' %>

and then do something like this:
<%= click_to_copy_text_field_tag 'share-link-1', "http://some_link", :size => 10 %>

Copyright (c) 2008 Andrew Ng, released under the MIT license
You can’t perform that action at this time.