How to search within JBCefBrowser
Answered
Hi
I am creating a plugin to manager web tab, I want to search within web, like chrome shortcut: ctrl+f
what should I do
Thanks
Please sign in to leave a comment.
Hi,
You can create a Swing component that will be shown when a user invokes finding action. A component should contain a text field for a search phrase. When a user types some text, you should invoke the find() method on org.cef.browser.CefBrowser rendering your content, which can be retrieved from JBCefBrowser.getCefBrowser(), e.g.:
Thanks for your reply,
but how can I create a shorcut for a panel within toolwindow, the shorcut is only available when the toolwindow is active
Take a look at https://intellij-support.jetbrains.com/hc/en-us/community/posts/6093988633106-Registering-some-transient-temporary-keyboard-shortcuts
Great!
I have read this post before, and I read it again, I found JComponent.registerKeyboardAction() is suitable.
Inspired by you, I found many methods in CefBrowser is exactly what I want
Thak you very much