Table of Contents

Class ClipboardService

Namespace
NuvTools.AspNetCore.Blazor.JSInterop
Assembly
NuvTools.AspNetCore.Blazor.dll

Provides JavaScript interop functionality for clipboard operations.

public sealed class ClipboardService : IClipboardService
Inheritance
ClipboardService
Implements
Inherited Members

Remarks

Initializes a new instance of the ClipboardService class.

Constructors

ClipboardService(IJSRuntime)

Provides JavaScript interop functionality for clipboard operations.

public ClipboardService(IJSRuntime jsRuntime)

Parameters

jsRuntime IJSRuntime

The JavaScript runtime for interop operations.

Remarks

Initializes a new instance of the ClipboardService class.

Methods

ReadTextAsync()

Reads text from the system clipboard asynchronously.

public ValueTask<string> ReadTextAsync()

Returns

ValueTask<string>

A ValueTask<TResult> representing the asynchronous operation, containing the clipboard text.

WriteTextAsync(string)

Writes text to the system clipboard asynchronously.

public ValueTask WriteTextAsync(string text)

Parameters

text string

The text to write to the clipboard.

Returns

ValueTask

A ValueTask representing the asynchronous operation.