Class Clipboard
java.lang.Object
org.vaadin.firitin.util.Clipboard
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
copyToClipboard
(String thisIsATestText) Copies the given text to the current user's clipboard using the Clipboard API.static CompletableFuture
<String> Reads text from the clipboard using the Clipboard API.
-
Constructor Details
-
Clipboard
public Clipboard()
-
-
Method Details
-
copyToClipboard
Copies the given text to the current user's clipboard using the Clipboard API.- Parameters:
thisIsATestText
- the text to be copied to the clipboard
-
readFromClipboard
Reads text from the clipboard using the Clipboard API. This method returns a CompletableFuture that resolves to the text read from the clipboard, once the required browser round-trip is done.- Returns:
- a CompletableFuture containing the text from the clipboard
-