You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am looking for a simple solution to be able to paste image data in to my Blazor app. This solution looked perfect, but I realised that it only supports text. I don't have a lot of experience with JavaScript or TypeScript, but it seems that the readText and writeText functions only provide text from the clipboard.
This is currently next on the list. It hasn't been a high priority as browser support is even worse for non-text Clipboard functionality, and the use-case is much rarer.
Also, Blazor's JS Interop was pretty bad at handling Blob data until .NET 6 which will be out in a couple weeks.
The ClipboardItem models which the clipboard.read() and clipboard.write() functions use is much more complicated than the text-based functionality, and requires multiple async calls to retrieve the data. Re-creating that API surface in C# will take some care.
The hope is to have non-text Data functionality in by the end of the year, but it may only be supported in .NET 6.
I am looking for a simple solution to be able to paste image data in to my Blazor app. This solution looked perfect, but I realised that it only supports text. I don't have a lot of experience with JavaScript or TypeScript, but it seems that the readText and writeText functions only provide text from the clipboard.
Have any of the contributors thought about providing support for other data such as images, using the read and write functions?
https://developer.mozilla.org/en-US/docs/Web/API/Clipboard
Thanks
The text was updated successfully, but these errors were encountered: