Package com.vaadin.flow.component.clipboard
@NullMarked
package com.vaadin.flow.component.clipboard
Server-side access to the browser's clipboard ? both writing (copy) and
reading (paste).
Use
Clipboard.onClick(component) to copy text, an image, or custom content to
the clipboard when a component is clicked. Use
Clipboard.onPaste(...) to react to text the user pastes onto a component,
and Clipboard.onFilePaste(...) to receive pasted files.
Copying goes through onClick rather than an ordinary server-side
click listener because the browser only grants clipboard write access while
it is handling a genuine user gesture, which is no longer valid by the time a
server round trip completes. Clipboard access also requires a secure context
(HTTPS or localhost).
-
ClassDescriptionEntry point for the browser clipboard API.Fluent surface returned from
Clipboard.onClick(T), used to declare what a click should write to or read from the clipboard.Multi-format payload forClipboardBinding.write(com.vaadin.flow.component.clipboard.ClipboardContent).Textual clipboard contents delivered toClipboardBinding.read(com.vaadin.flow.function.SerializableConsumer<com.vaadin.flow.component.clipboard.ClipboardPayload>, com.vaadin.flow.function.SerializableConsumer<com.vaadin.flow.component.trigger.internal.PromiseAction.Error>)'s payload handler.Fired by theonCompletestep of aPasteFileHandler.batch()once all expected files of a paste have been delivered to theonFilestep.Server-side representation of a browserpasteevent delivered to a listener registered withClipboard.onPaste.A single file delivered to aClipboard.onFilePaste(com.vaadin.flow.component.Component, com.vaadin.flow.server.streams.UploadHandler)listener throughPasteFileHandler.perFileor theonFilestep of abatch.Factory for paste-awareUploadHandlers that group the parallel fetch uploads of a single paste gesture and surface the result to application code.Fluent builder for the batch paste handler.Configuration forClipboard.onPaste.Fired by theonStartstep of aPasteFileHandler.batch()once per paste, immediately before the paste's firstPasteFileis delivered.