Releases: p6laris/ClipLazor
ClipLazor v3.0.2
Version 3.0.2
Enhancements
-
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.
- If the Clipboard API does not support copying text, the library now falls back to using
-
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.
- Introduced a new
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
Fixing check clipboard API permissions for non-Chromium browsers.
ClipLazor v2.1.1
Fixing js module importing
ClipLazor v2.1.0
Update the NuGet package.
ClipLazor v2.0.0
🚩 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
-
Environment Support Check: Now you can easily check if the environment supports clipboard operations.
-
Permission Verification: Determine whether your application has read and write permissions for clipboard operations.
-
Effortless Clipboard Data Manipulation: Seamlessly read and write data to the clipboard with improved methods.