Clipboard


How to use the Clipboard class of the bit Butil?

Usage
To use the browser Clipboard features you need to inject the Bit.Butil.Clipboard class and use it like this:
@inject Bit.Butil.Clipboard clipboard

@code {
    var text = await clipboard.ReadText();
}
Methods

ReadText:
Requests text from the system clipboard, returning a Promise that is fulfilled with a string containing the clipboard's text once it's available (MDN).



WriteText:
Requests text from the system clipboard, returning a Promise that is fulfilled with a string containing the clipboard's text once it's available (MDN).



Read:
Requests arbitrary data (such as images) from the clipboard, returning a Promise that resolves with an array of ClipboardItem objects containing the clipboard's contents (MDN).



Write:
Writes arbitrary data to the system clipboard, returning a Promise that resolves when the operation completes (MDN).