Toggle jump between Khoj side pane & previous editor via cmd, kbd shortcut

Improve quick navigation to, from Khoj side pane using Keyboard
shortcut or Obsidian command
This commit is contained in:
Debanjum Singh Solanky
2024-06-27 08:40:24 +05:30
parent fbb95ca342
commit 3723904512
2 changed files with 21 additions and 9 deletions

View File

@@ -333,6 +333,12 @@ export function createCopyParentText(message: string, originalButton: string = '
}
}
export function jumpToPreviousView() {
const editor: Editor = this.app.workspace.getActiveFileView()?.editor
if (!editor) return;
editor.focus();
}
export function pasteTextAtCursor(text: string | undefined) {
// Get the current active file's editor
const editor: Editor = this.app.workspace.getActiveFileView()?.editor