Hello,
Wisej.Web.Clipboard.SetClientText is other than IE11
with 2.1.39(Development)
Clipboard copy does not work.
Cannot copy Firefox, Chorome, Edge clipboard.
How do I use Firefox, Chrome, and Edge clipboards?
————————————————————————
private void button1_Click(object sender, EventArgs e)
{
Wisej.Web.Clipboard.SetClientText(“text clipboard”);
this.Eval(@”Wisej.Core.copy();”);
}
————————————————————————
No, it’s impossible. As I wrote all browsers block it without a direct user action. You need to attach a client event and execute the javascript code.
Thank you
I understand that you can’t set the clipboard in the browser from the server except IE11.
Are you planning to add a function to set the clipboard from the server to the browser other than IE11?
You cannot set the clipboard in the browser from the server. All browsers (maybe except IE) block the action.
See
https://wisej.com/support/question/how-to-use-text-from-clipboard
https://wisej.com/support/question/read-from-clipboard
The call
Wisej.Web.Clipboard.SetClientText(“text clipboard”);
Transfers the data to the client. Then you need to call Wisej.Core.copy() to set the browser’s clipboard in a client event. The best way is a button with a client event “execute”, calling Wisej.Core.copy().
The server call Wisej.Web.Clipboard.SetClientText(“text clipboard”) calls Wisej.Core.copy(text) so in case the browser allows it it also sets the clipboard. But now all browsers block it so you need the client event.
You may also skip Wisej.Web.Clipboard.SetClientText(“text clipboard”) and just call Wisej.Core.copy(text) in your client event.
HTH
Please login first to submit.