mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-11-05 15:31:53 +00:00
1.5 KiB
1.5 KiB
Title, Added, Status, Last reviewed
| Title | Added | Status | Last reviewed |
|---|---|---|---|
| Clipboard directive | v3.2.0 | Active | 2019-04-12 |
Clipboard directive
Copies text to the clipboard.
Basic Usage
<span adf-clipboard="translate_key" [clipboard-notification]="notify message">
text to copy
</span>
<button adf-clipboard="translate_key" target="ref" [clipboard-notification]="notify message">
Copy
</button>
Class members
Properties
| Name | Type | Default value | Description |
|---|---|---|---|
| message | string |
Translation key or message for snackbar notification. | |
| placeholder | string |
Translation key or message for the tooltip. | |
| target | HTMLInputElement|HTMLTextAreaElement |
Reference to the HTML element containing the text to copy. |
Details
Clicking on the decorated element will copy the text content of that element (or the
element specified in the target property) to the clipboard.
Use the parameter to adf-clipboard to specify a tooltip message that will be shown when
the user hovers the mouse over the element. You can also provide a snackbar message in the
clipboard-notification property, which will appear when the copying is complete.