chore(ckeditor): create shared type for editor

This commit is contained in:
Elian Doran
2025-05-05 21:44:27 +03:00
parent 6386c45212
commit 70ec38d534
4 changed files with 23 additions and 8 deletions

View File

@@ -26,7 +26,7 @@ import type TypeWidget from "../widgets/type_widgets/type_widget.js";
import type EditableTextTypeWidget from "../widgets/type_widgets/editable_text.js";
import type { NativeImage, TouchBar } from "electron";
import TouchBarComponent from "./touch_bar.js";
import type { ClassicEditor, PopupEditor } from "@triliumnext/ckeditor5";
import type { CKTextEditor } from "@triliumnext/ckeditor5";
interface Layout {
getRootWidget: (appContext: AppContext) => RootWidget;
@@ -188,7 +188,7 @@ export type CommandMappings = {
callback: (value: NoteDetailWidget | PromiseLike<NoteDetailWidget>) => void;
};
executeWithTextEditor: CommandData &
ExecuteCommandData<ClassicEditor | PopupEditor> & {
ExecuteCommandData<CKTextEditor> & {
callback?: GetTextEditorCallback;
};
executeWithCodeEditor: CommandData & ExecuteCommandData<CodeMirrorInstance>;