Page 1 of 1

Need help implementing CTRL+F find text in java-cef(solved)

PostPosted: Thu Sep 19, 2019 2:49 am
by JohnnyTheHun
I would like to implement the CTRL+F functionality (search for text) similar to how browsers do it.
I searched on the Internet and CEF seems to support this someway, e.g. it has a CefFindHandler class (https://bitbucket.org/chromiumembedded/ ... ndler.h-60).

But I do not see this in the java-cef API.

Could you recommend anything?

Thank you!
Janos

Re: Need help implementing CTRL + F find text in java-cef

PostPosted: Thu Sep 19, 2019 4:32 am
by JohnnyTheHun
My bad, CefBrowser has a wonderful function called find and it works beautifully:
find
void find(int identifier,
java.lang.String searchText,
boolean forward,
boolean matchCase,
boolean findNext)
Search for some kind of text on the page.
Parameters:
identifier - can be used to have multiple searches running simultaniously.
searchText - to be searched for.
forward - indicates whether to search forward or backward within the page.
matchCase - indicates whether the search should be case-sensitive.
findNext - indicates whether this is the first request or a follow-up.

Re: Need help implementing CTRL+F find text in java-cef(solv

PostPosted: Tue Nov 19, 2019 10:09 am
by JohnnyTheHun
BTW: is there any way to retrieve the number of results similar to how chrome shows it?