Page 1 of 1

Make a copy/paste

Posted: Thu May 30, 2024 10:03 pm
by Mili
Hello,

I have a text in a TMemo. I want to copy this text to "ChromiumWindow1". i.e., “copy” from “Memo1” and “paste” into “ChromiumWindow1”.
How to do it please?

thank you

Re: Make a copy/paste

Posted: Fri May 31, 2024 8:39 am
by salvadordf
Hi,

Use the SimpleBrowser2 demo as a template for your application and use JavaScript with the TChromiumCore.ExecuteJavaScript procedure :
https://stackoverflow.com/questions/7609130/set-the-default-value-of-an-input-field

Search ExecuteJavaScript in all the demos to see many examples using that procedure.

Re: Make a copy/paste

Posted: Fri May 31, 2024 10:02 am
by sodlf159
Data := Clipboard;
Data.AsText := B; //keyword
Form1.Chromium1.ClipboardPaste;