Skip to content

Releases: p6laris/ClipLazor

ClipLazor v3.0.2

27 Nov 01:33
Compare
Choose a tag to compare

Version 3.0.2

Enhancements

  1. Improved Clipboard API Fallback

    • If the Clipboard API does not support copying text, the library now falls back to using document.execCommand. This ensures broader compatibility across browsers and environments.
  2. New Feature: ClipboardTextAction Component

    • Introduced a new ClipboardTextAction component for easily copying text content from a targeted HTML element or a text. This streamlines text-copying operations.

Example Usage of ClipboardTextAction

<input id="nameInput" />
<ClipboardTextAction TargetId="nameInput" Action="ClipboardAction.Cut" OnAction="HandleAction"/>
@* OR *@
<ClipboardTextAction Text="Hello World!">Say hi to the clipboard</ClipboardTextAction>


@code {
private void HandleAction(OnTextActionEventArgs e){
    string message = string.Empty;

    if (e.IsSuccess)
    {
        var action = e.Action is ClipboardAction.Copy ? "copied" : "cut";
        message = $"Text: {e.Text} has been {action} successfully.";
    }
    else
        message = $"Could not {e.Action.ToString()} to the clipboard.";

 }
}

Issue Fix: TypeScript Output JavaScript File

Fixed an issue where the TypeScript-generated JavaScript file was not included in the output directory. The TypeScript output configuration has been corrected, ensuring the file is now properly generated and available in the wwwroot folder. #4

ClipLazor v2.1.2

15 Nov 04:57
b45b382
Compare
Choose a tag to compare

Fixing check clipboard API permissions for non-Chromium browsers.

ClipLazor v2.1.1

09 Feb 17:16
Compare
Choose a tag to compare

Fixing js module importing

ClipLazor v2.1.0

20 Nov 03:56
Compare
Choose a tag to compare
Update the NuGet package.

ClipLazor v2.0.0

21 Sep 12:40
20ea13f
Compare
Choose a tag to compare

🚩 Enhanced TypeScript Support for Clipboard API

In this release, we've further improved the TypeScript support to create a more type-safe environment for working with the clipboard API. We've directly aligned the callback types with TypeScript return types, eliminating the need for manual type conversion. The documentation has also been refined for better clarity, and method conventions has been updated.

New Features in This Version

  1. Environment Support Check: Now you can easily check if the environment supports clipboard operations.

  2. Permission Verification: Determine whether your application has read and write permissions for clipboard operations.

  3. Effortless Clipboard Data Manipulation: Seamlessly read and write data to the clipboard with improved methods.