Copy to Clipboard Component

In this article

Pro and Enterprise editions only

Coveo for Salesforce 3.48 (March 2020)

The CopyToClipboard component is a result action that allows Coveo Insight Panel Lightning Component users to quickly copy a well-formatted result to the clipboard.

To copy a well-formatted result to the clipboard, click Copy-to-Clipboard.

Options

The component offers the following options:

icon

The icon that the ResultAction will display. If text is provided, the button will contain that text. If the HTML of an SVG image is provided, that image will be displayed in the button.

<div class='CoveoCopyToClipboard' data-icon='Copy to Clipboard'></div>

tooltip

The tooltip that displays when hovering the Copy to Clipboard result action.

Default value is Copy.

<div class='CoveoCopyToClipboard' data-tooltip='<MY_TOOLTIP>'></div>

Where you can replace <MY_TOOLTIP> by the tooltip that should be displayed when users hover over the Copy to Clipboard result action.

successTooltip

The tooltip that displays when the action succeeds.

Default value is Copied!.

<div class='CoveoCopyToClipboard' data-success-tooltip='<MY_TOOLTIP>'></div>

Where you can replace <MY_TOOLTIP> by the tooltip that should be displayed when the action succeeds.

template

Specifies the template that will be used for the Copy to Clipboard result action.

Default value is ${title}\n${ClickUri}.

<div class='CoveoCopyToClipboard' data-template="${title}, ${clickUri}"></div>

Methods

This component doesn’t provide any methods.

Usage

This component can be included in the Coveo Insight Panel Lightning Component. It should be inserted in the <div class='CoveoResultActionsMenu'> section.

<div class='CoveoCopyToClipboard'></div>