UNPKG

@ckeditor/ckeditor5-ai

Version:

AI features for CKEditor 5.

20 lines (19 loc) 1.13 kB
/** * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options */ import { type ContextInterface, Editor } from '@ckeditor/ckeditor5-core'; /** * Returns all editor instances registered on the context. For a single editor passed as `context`, returns `[ context ]`. * Returns an empty array when the context has no editors yet. */ export declare function getEditorsFromContext(context: ContextInterface | null | undefined): Array<Editor>; /** * Returns the editor that should drive user-driven AI operations when several editors share a {@link module:core/context~Context Context}: * the one with UI focus if any, otherwise the last editor that had UI focus (tracked by {@link module:ai/aicore/aiediting~AIEditing}), * otherwise the first editor in registration order. * * For a single editor passed as `context`, returns that editor. */ export declare function getTargetEditorFromContext(context: ContextInterface): Editor; export declare function getEditorFromContext(context: ContextInterface): Editor;