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

Having problems with building or using the JCEF Java binding? Ask your questions here.

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

Postby JohnnyTheHun » Thu Sep 19, 2019 2:49 am

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
Last edited by JohnnyTheHun on Thu Sep 19, 2019 4:33 am, edited 1 time in total.
JohnnyTheHun
Techie
 
Posts: 19
Joined: Tue Apr 10, 2018 12:24 pm

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

Postby JohnnyTheHun » Thu Sep 19, 2019 4:32 am

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.
JohnnyTheHun
Techie
 
Posts: 19
Joined: Tue Apr 10, 2018 12:24 pm

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

Postby JohnnyTheHun » Tue Nov 19, 2019 10:09 am

BTW: is there any way to retrieve the number of results similar to how chrome shows it?
JohnnyTheHun
Techie
 
Posts: 19
Joined: Tue Apr 10, 2018 12:24 pm


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 1 guest