Open phcerdan opened 7 years ago
hmm good point - there is no browser find equivalent interface built into electron - we'll have to add it directly to our lens reader window, perhaps using one of these:
@CAYdenberg if we use electron-in-page-search
, this would be achieved from inside the reader
view as opposed to Lens. This has the benefit of also supporting other readers that we might want in the future (scholarlyHTML, ePub, etc.), and that it can be maintained outside Lens, and that we can apply it to other parts of the app if that becomes appropriate.
See the docs linked above, but it should work something like this on the reader webview:
const frame = html`<webview id="reader" class="${style.frame}"></webview>`
// frame customisation stuff
const readersearch = searchInPage(frame)
// register a keyboard shortcut for cmd[OR]ctrl+f
function onCmdOrCtrlF () {
readersearch.openSearchWindow()
}
We have not yet set up the app-wide shortcut registering mechanism - but if you're interested in implementing this I can make that a priority.
@CAYdenberg haha I wrote this before I saw your PR #130 - looks like you took matters into your own hands which is awesome :D
Hey, I guess the amazing Lens reader rely on the browser search functionalities? How do we search from the electron app?