[ADF-4391] Doc review for 3.2 (#4601)

* [ADF-4391] Reviewed new clipboard class docs

* [ADF-4391] Reviewed new proc cloud class docs

* [ADF-4391] Reviewed new datatable doc additions
This commit is contained in:
Andy Stark
2019-04-12 16:18:43 +01:00
committed by Eugenio Romano
parent 16aaa0f0b3
commit 921fdc00df
16 changed files with 256 additions and 153 deletions

View File

@@ -1,13 +1,13 @@
---
Title: Copy Clipboard directive
Title: Clipboard directive
Added: v3.2.0
Status: Active
Last reviewed: 2019-04-01
Last reviewed: 2019-04-12
---
# [Clipboard directive](../../../lib/core/clipboard/clipboard.directive.ts "Defined in clipboard.directive.ts")
Copy text to clipboard
Copies text to the clipboard.
## Basic Usage
@@ -21,16 +21,25 @@ Copy text to clipboard
</button>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| target | `HTMLElement ref` | false | HTMLElement reference |
| clipboard-notification | `string` | | Translation key message for toast notification |
| adf-clipboard | `string` | | Translation key or message for the tooltip. |
| clipboard-notification | `string` | | Translation key or message for snackbar notification. |
| target | [`HTMLInputElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement)` \| `[`HTMLTextAreaElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement) | | Reference to the HTML element containing the text to copy. |
## Details
When the user hover the directive element a tooltip will will show up to inform that, when you click on the current element, the content or the reference content will be copied into the clipboard.
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.
## See also
- [Clipboard service](../../core/services/clipboard.service.md)