clipboard-copy

WebJar for clipboard-copy

License

License

Categories

Categories

CLI User Interface
GroupId

GroupId

org.webjars.bowergithub.advanced-rest-client
ArtifactId

ArtifactId

clipboard-copy
Last Version

Last Version

2.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

clipboard-copy
WebJar for clipboard-copy
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/advanced-rest-client/clipboard-copy

Download clipboard-copy

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bowergithub.advanced-rest-client/clipboard-copy/ -->
<dependency>
    <groupId>org.webjars.bowergithub.advanced-rest-client</groupId>
    <artifactId>clipboard-copy</artifactId>
    <version>2.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bowergithub.advanced-rest-client/clipboard-copy/
implementation 'org.webjars.bowergithub.advanced-rest-client:clipboard-copy:2.0.1'
// https://jarcasting.com/artifacts/org.webjars.bowergithub.advanced-rest-client/clipboard-copy/
implementation ("org.webjars.bowergithub.advanced-rest-client:clipboard-copy:2.0.1")
'org.webjars.bowergithub.advanced-rest-client:clipboard-copy:jar:2.0.1'
<dependency org="org.webjars.bowergithub.advanced-rest-client" name="clipboard-copy" rev="2.0.1">
  <artifact name="clipboard-copy" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bowergithub.advanced-rest-client', module='clipboard-copy', version='2.0.1')
)
libraryDependencies += "org.webjars.bowergithub.advanced-rest-client" % "clipboard-copy" % "2.0.1"
[org.webjars.bowergithub.advanced-rest-client/clipboard-copy "2.0.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.bowergithub.polymer : polymer jar [2.0.0,3)

Project Modules

There are no modules declared in this project.

Published on NPM

Build Status

Published on webcomponents.org

clipboard-copy

An element that copies a text to clipboard.

API components

This components is a part of API components ecosystem

Usage

Installation

npm install --save @advanced-rest-client/clipboard-copy

In an html file

<script type="module" src="/node_modules/@advanced-rest-client/clipboard-copy/clipboard-copy.js"></script>
<clipboard-copy content="test"></clipboard-copy>
<script>
const elm = document.querySelectior('clipboard-copy');
if(elm.copy()) {
 console.info('Content has been copied to the clipboard');
} else {
 console.error('Content copy error. This browser is ancient!');
}
</script>

In a LitElement

import { LitElement, html } from 'lit-element';
import '@advanced-rest-client/clipboard-copy/clipboard-copy.js';

class SampleElement extends LitElement {
  render() {
    return html`
    <clipboard-copy .content="${this.copyContent}"></clipboard-copy>
    `;
  }
}
customElements.define('sample-element', SampleElement);

Development

git clone https://github.com/advanced-rest-client/clipboard-copy
cd clipboard-copy
npm install

Running the demo locally

npm start

Running the tests

npm test
org.webjars.bowergithub.advanced-rest-client

ARC

A set of repositories related to the Advanced REST Client and API console (by Mulesoft)

Versions

Version
2.0.1