Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(command_palette): text editor-based issues not working
Elian Doran11d086ef12a4
diff --git a/apps/client/src/services/command_registry.ts b/apps/client/src/services/command_registry.tsindex a8721e43f3..e3ffb36a4f 100644--- a/apps/client/src/services/command_registry.ts+++ b/apps/client/src/services/command_registry.ts@@ -244,6 +244,8 @@ class CommandRegistry {if (command.keyboardAction && command.commandName) {if (command.keyboardAction.scope === "note-tree") {this.executeWithNoteTreeFocus(command.commandName);+ } else if (command.keyboardAction.scope === "text-detail") {+ this.executeWithTextDetail(command.commandName);} else {appContext.triggerCommand(command.commandName);}@@ -272,6 +274,17 @@ class CommandRegistry {node: activeNode});}++ private async executeWithTextDetail(actionName: CommandNames) {+ const typeWidget = await appContext.tabManager.getActiveContext()?.getTypeWidget();+ if (!typeWidget) {+ return;+ }++ typeWidget.triggerCommand(actionName, {+ ntxId: appContext.tabManager.activeNtxId+ });+ }}const commandRegistry = new CommandRegistry();