ember-cli-clipboard
A simple ember wrapper around clipboard.js (no flash)
Demo Page
http://jkusa.github.io/ember-cli-clipboard
Usage
<!-- Set text directly -->
{{#copy-button
clipboardText='text to be copied'
success='success'
error='error'
}}
Click To Copy
{{/copy-button}}
<!-- Get text from target element -->
<input id="url" type="text" value="https://github.com/jkusa/ember-cli-clipboard">
{{#copy-button
clipboardTarget="#url"
success='success'
error='error'
}}
Click To Copy
{{/copy-button}}
Properties
clipboardText
- string value to be copiedclipboardTarget
- selector string of element from which to copy textclipboardAction
- string value of operation: copy
or cut
(default is copy)
Actions
The following clipboard.js custom events are sent as actions
success
sent on successful copyerror
sent on failed copy
More information about the clipboard.js events can be found here
Browser Support
For browser support information, checkout the clipboard.js documentation:
https://github.com/zenorocha/clipboard.js/#browser-support
Installation
git clone
this repositorynpm install
bower install
Running
Running Tests
ember test
ember test --server
Building
For more information on using ember-cli, visit http://www.ember-cli.com/.