Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

how to get selected text?

Post Reply
User avatar
salvadordf
Posts: 4057
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: how to get selected text?

Post by salvadordf »

Hi,

Try the TChromium.ClipboardCopy function and read the clipboard text.

If you prefer to use a DOM visitor then open the DOMVisitor demo and modify the DOMVisitor_OnDocAvailable function inside the DPR file to send document.SelectionAsText instead of document.Title.
User avatar
salvadordf
Posts: 4057
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: how to get selected text?

Post by salvadordf »

Hi,

I just modified he DOMVisitor demo and now it adds the selected text to the debug.log file when you click the "Visit DOM" button.

Please, download CEF4Delphi and try the DOMVisitor demo.
Post Reply