You will have to visit DOM, and as a gift you'll receive a reference to the current ICefDomDocument
document interface. The ICefDomDocument
interface then offers the SelectionAsText
method, which returns the current selection as text (if any). In code you may write something like:
procedure TForm1.Button1Click(Sender: TObject);
begin
Chromium1.Browser.GetFocusedFrame.VisitDomProc(
procedure(const document: ICefDomDocument)
begin
ShowMessage(document.SelectionAsText);
end
);
end;