mirror of
https://github.com/zadam/trilium.git
synced 2025-11-17 02:30:42 +01:00
fix(touch_bar): fix text editor commands
This commit is contained in:
@@ -2,19 +2,8 @@ import utils from "../services/utils.js";
|
||||
import Component from "../components/component.js";
|
||||
import appContext from "../components/app_context.js";
|
||||
import NoteContextAwareWidget from "./note_context_aware_widget.js";
|
||||
import type FNote from "../entities/fnote.js";
|
||||
import type { TouchBarButton, TouchBarGroup, TouchBarSegmentedControl, TouchBarSpacer } from "@electron/remote";
|
||||
|
||||
async function triggerTextEditorCommand(command: string, args?: object) {
|
||||
const editor = await appContext.tabManager.getActiveContext().getTextEditor();
|
||||
if (!editor) {
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: Fix type of editor.
|
||||
(editor as any).execute(command, args);
|
||||
}
|
||||
|
||||
export default class TouchBarWidget extends NoteContextAwareWidget {
|
||||
|
||||
nativeImage: typeof import("electron").nativeImage;
|
||||
|
||||
Reference in New Issue
Block a user