mirror of
https://github.com/zadam/trilium.git
synced 2025-11-26 02:24:23 +01:00
note context menu: search selected text in Trilium
This commit is contained in:
parent
3afe6df9f2
commit
b982ca2c5b
@ -119,6 +119,17 @@ function setupContextMenu() {
|
|||||||
uiIcon: "bx bx-search-alt",
|
uiIcon: "bx bx-search-alt",
|
||||||
handler: () => electron.shell.openExternal(searchUrl)
|
handler: () => electron.shell.openExternal(searchUrl)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
items.push({
|
||||||
|
title: t("electron_context_menu.search_in_trilium", { term: shortenedSelection }),
|
||||||
|
uiIcon: "bx bx-search",
|
||||||
|
handler: async () => {
|
||||||
|
const appContext = (await import("../components/app_context.js")).default;
|
||||||
|
await appContext.triggerCommand("searchNotes", {
|
||||||
|
searchString: params.selectionText
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (items.length === 0) {
|
if (items.length === 0) {
|
||||||
|
|||||||
@ -1868,6 +1868,7 @@
|
|||||||
"copy-link": "Copy link",
|
"copy-link": "Copy link",
|
||||||
"paste": "Paste",
|
"paste": "Paste",
|
||||||
"paste-as-plain-text": "Paste as plain text",
|
"paste-as-plain-text": "Paste as plain text",
|
||||||
|
"search_in_trilium": "Search in Trilium for \"{{term}}\"",
|
||||||
"search_online": "Search for \"{{term}}\" with {{searchEngine}}"
|
"search_online": "Search for \"{{term}}\" with {{searchEngine}}"
|
||||||
},
|
},
|
||||||
"image_context_menu": {
|
"image_context_menu": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user