Current section

Files

Jump to
ckeditor5_phoenix dist hooks editor utils query-all-editor-editables.d.ts
Raw

dist/hooks/editor/utils/query-all-editor-editables.d.ts

import { EditorId } from '../typings';
/**
* Gets the initial root elements for the editor based on its type.
*
* @param editorId The editor's ID.
* @returns The root element(s) for the editor.
*/
export declare function queryEditablesElements(editorId: EditorId): Record<string, HTMLElement>;
/**
* Gets the initial data for the roots of the editor. If the editor is a single editing-like editor,
* it retrieves the initial value from the element's attribute. Otherwise, it returns an object mapping
* editable names to their initial values.
*
* @param editorId The editor's ID.
* @returns The initial values for the editor's roots.
*/
export declare function queryEditablesSnapshotContent(editorId: EditorId): Record<string, string>;
/**
* Queries all editable elements within a specific editor instance.
*
* @param editorId The ID of the editor to query.
* @returns An object mapping editable names to their corresponding elements and initial values.
*/
export declare function queryAllEditorEditables(editorId: EditorId): Record<string, EditableItem>;
/**
* Type representing an editable item within an editor.
*/
export type EditableItem = {
content: HTMLElement;
initialValue: string;
};
//# sourceMappingURL=query-all-editor-editables.d.ts.map