File

copy-content/src/copy-content/copy-content.directive.ts

Description

CopyContent provides a CopyContentButton which is displayed when the hosting element is hovered. By default the CopyContentButton is displayed right of the hosting element (east). The preferred position can be changed (s. copyContentPosition). If space is limited, position is adjusted automatically.

Example :
<span textToCopy="text to copy" />

Import

Example :
import { CopyContentDirective } from '@talenra/components/copy-content';

Implements

OnDestroy

Metadata

Index

Inputs

Inputs

negativeColor
Default value : false, { transform: booleanAttribute, alias: 'copyContentNegativeColor' }

Inverts the color of the icon (white with opacity 0.5). Useful for dark backgrounds.

Example :
<span textToCopy="Text to copy" copyContentNegativeColor />
position
Type : TCopyContentPosition
Default value : 'east', { alias: 'copyContentPosition' }

The position relative to the hosting element ('north', 'east', …). Defaults to 'east'.

Example :
<span textToCopy="Text to copy" copyContentPosition="west" />

See CopyContentPosition See TCopyContentPosition

toCopy
Type : string
Default value : '', { alias: 'textToCopy' }

Text copied to clipboard when element is clicked.

Example :
<span textToCopy="Text to copy" />
tooltip
Type : string
Default value : '', { alias: 'copyContentTooltip' }

Text displayed in the tooltip.

Example :
<talenra-copy-content-button copyContentTooltip="Text displayed in tooltip" />

results matching ""

    No results matching ""