UNPKG

@ckeditor/ckeditor5-core

Version:

The core architecture of CKEditor 5 – the best browser-based rich text editor.

59 lines (58 loc) • 1.94 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 */ /** * @module core/errorattribution/liveeditors */ import type { Editor } from "../editor/editor.js"; import type { Context } from "../context.js"; /** * Adds an editor to the list of the ones error attribution may be asked about. * * @internal */ export declare function _addLiveEditor(editor: Editor): void; /** * Removes an editor from the list of the ones error attribution may be asked about. * * @internal */ export declare function _removeLiveEditor(editor: Editor): void; /** * The editors error attribution may be asked about, in the order they became ready. * * References whose editor has been collected are dropped on the way through. That is the only cleanup * there is, and it is enough: the list is read whenever an error is reported, and an entry left behind * until then costs one dead reference. * * @internal */ export declare function _getLiveEditors(): Iterable<Editor>; /** * Adds a context to the list of the ones error attribution may be asked about. * * Adding one twice registers it once, the way adding to a set does. Removal takes one entry, so a second * registration would outlive the removal on destroy and a destroyed context would keep being named. * * @internal */ export declare function _addLiveContext(context: Context): void; /** * Removes a context from the list of the ones error attribution may be asked about. * * @internal */ export declare function _removeLiveContext(context: Context): void; /** * The contexts error attribution may be asked about, in the order they were created. * * @internal */ export declare function _getLiveContexts(): Iterable<Context>; /** * Whether the context is one of those attribution may name. * * @internal */ export declare function _isLiveContext(context: unknown): boolean;