mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
partial workaround for the broken in page search (next & previous don't work, but at least highlighting works)
This commit is contained in:
@@ -97,14 +97,19 @@ function registerEntrypoints() {
|
||||
|
||||
$(document).bind('keydown', 'ctrl+f', () => {
|
||||
if (utils.isElectron()) {
|
||||
alert("In page search doesn't work in this beta");
|
||||
const $searchWindowWebview = $(".electron-in-page-search-window");
|
||||
$searchWindowWebview.show();
|
||||
|
||||
// const searchInPage = require('electron-in-page-search').default;
|
||||
// const remote = require('electron').remote;
|
||||
//
|
||||
// const inPageSearch = searchInPage(remote.getCurrentWebContents());
|
||||
//
|
||||
// inPageSearch.openSearchWindow();
|
||||
const searchInPage = require('electron-in-page-search').default;
|
||||
const {remote} = require('electron');
|
||||
|
||||
const inPageSearch = searchInPage(remote.getCurrentWebContents(), {
|
||||
searchWindowWebview: $searchWindowWebview[0],
|
||||
//openDevToolsOfSearchWindow: true,
|
||||
customCssPath: '/libraries/electron-in-page-search/default-style.css'
|
||||
});
|
||||
|
||||
inPageSearch.openSearchWindow();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user