🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@coveops/copy-to-clipboard

Package Overview
Dependencies
Maintainers
12
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coveops/copy-to-clipboard

Allows the user to copy a value to their clipboard.

npmnpm
Version
1.0.0
Version published
Weekly downloads
35
12.9%
Maintainers
12
Weekly downloads
 
Created
Source

CopyToClipboard

Allows the user to copy a value to their clipboard.

Disclaimer: This component was built by the community at large and is not an official Coveo JSUI Component. Use this component at your own risk.

Getting Started

  • Install the component into your project
npm i @coveops/copy-to-clipboard
  • Import fontawesome into the markup
<script src="https://kit.fontawesome.com/515c3b5b58.js" crossorigin="anonymous"></script>
  • Use the Component or extend it

Typescript:

import { CopyToClipboard, ICopyToClipboardOptions } from '@coveops/copy-to-clipboard';

Javascript

const CopyToClipboard = require('@coveops/copy-to-clipboard').CopyToClipboard;
  • You can also expose the component alongside other components being built in your project.
export * from '@coveops/copy-to-clipboard'
  • Include the component in your template as follows:

Place the component after the last tab in the coveo-tab-section

<div class="CoveoCopyToClipboard"></div>

Extending

Extending the component can be done as follows:

import { CopyToClipboard, ICopyToClipboardOptions } from "@coveops/copy-to-clipboard";

export interface IExtendedCopyToClipboardOptions extends ICopyToClipboardOptions {}

export class ExtendedCopyToClipboard extends CopyToClipboard {}

Contribute

  • Clone the project
  • Copy .env.dist to .env and update the COVEO_ORG_ID and COVEO_TOKEN fields in the .env file to use your Coveo credentials and SERVER_PORT to configure the port of the sandbox - it will use 8080 by default.
  • Build the code base: npm run build
  • Serve the sandbox for live development npm run serve

FAQs

Package last updated on 17 Jul 2020

Did you know?

Socket

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.

Install

Related posts