refactor(client): fix type errors related to CKEditor

This commit is contained in:
Elian Doran
2025-05-10 01:52:42 +03:00
parent 3bad43c50d
commit aab762911b
6 changed files with 100 additions and 200 deletions

View File

@@ -1,7 +1,8 @@
import "ckeditor5/ckeditor5.css";
import { COMMON_PLUGINS, CORE_PLUGINS, POPUP_EDITOR_PLUGINS } from "./plugins";
import { BalloonEditor, DecoupledEditor } from "ckeditor5";
import { BalloonEditor, DecoupledEditor, FindAndReplaceEditing, FindCommand } from "ckeditor5";
export { EditorWatchdog } from "ckeditor5";
export type { EditorConfig, MentionFeed, MentionFeedObjectItem, Node, Position, Element, WatchdogConfig } from "ckeditor5";
/**
* Short-hand for the CKEditor classes supported by Trilium for text editing.
@@ -12,6 +13,9 @@ export type CKTextEditor = (ClassicEditor | PopupEditor) & {
removeSelection(): Promise<void>;
};
export type FindAndReplaceState = FindAndReplaceEditing["state"];
export type FindCommandResult = ReturnType<FindCommand["execute"]>;
/**
* The text editor that can be used for editing attributes and relations.
*/