
Product
Introducing Custom Pull Request Alert Comment Headers
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
ember-cli-zero-clipboard
Advanced tools
Ember CLI addon for adding a 'copy to clipboard' button component.
This is an Ember CLI addon for adding a Zero Clipboard component.
$ npm install --save-dev ember-cli-zero-clipboard
In your handlebars template just do:
{{zero-clipboard text=TEXT label=LABEL}}
or
{{zero-clipboard cbTarget=TARGET_ELEMENT_ID label=LABEL}}
{{zero-clipboard text=repoPath label="Copy" innerClass="btn btn-default"}}
will output:
<div title="Copy to clipboard" data-clipboard-text="https://github.com/aomra015/ember-cli-zero-clipboard">
<button class="btn btn-default">Copy</button>
</div>
You can subclass this module if you want to add specific behaviours:
// file: your-app/components/zero-clipboard.js
import ZeroClipboard from 'ember-cli-zero-clipboard/components/zero-clipboard';
export default ZeroClipboard.extend({
actions: {
afterCopy: function(){
// this gets triggered after the copy event
// see https://github.com/zeroclipboard/zeroclipboard/blob/master/docs/api/ZeroClipboard.md#static-events for full list of events
alert("after copy");
}
}
});
You can also pass a closure action, without subclassing the component.
{{zero-clipboard afterCopy=(action "alertAfterCopy")}}
Pass a block if you want to customize the html:
{{#zero-clipboard text='Hello'}}
<p>COPY ME!</p>
{{/zero-clipboard}}
FAQs
Ember CLI addon for adding a 'copy to clipboard' button component.
We found that ember-cli-zero-clipboard demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.