/** * @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 ai/aicore/utils/geteditorconfig */ import { type Editor } from "@ckeditor/ckeditor5-core"; import { type AlignmentConfig } from "@ckeditor/ckeditor5-alignment"; import { type CodeBlockConfig } from "@ckeditor/ckeditor5-code-block"; import { type FontSizeConfig, type FontFamilyConfig, type FontColorConfig } from "@ckeditor/ckeditor5-font"; import { type FootnotesConfig } from "@ckeditor/ckeditor5-footnotes"; import { type HeadingConfig } from "@ckeditor/ckeditor5-heading"; import { type HighlightConfig } from "@ckeditor/ckeditor5-highlight"; import { type ImageConfig } from "@ckeditor/ckeditor5-image"; import { type IndentBlockConfig } from "@ckeditor/ckeditor5-indent"; import { type TextPartLanguageOption } from "@ckeditor/ckeditor5-language"; import { type LineHeightConfig } from "@ckeditor/ckeditor5-line-height"; import { type LinkConfig } from "@ckeditor/ckeditor5-link"; import { type ListConfig } from "@ckeditor/ckeditor5-list"; import { type MentionConfig } from "@ckeditor/ckeditor5-mention"; import { type MergeFieldsConfig } from "@ckeditor/ckeditor5-merge-fields"; import { type MultiLevelListConfig } from "@ckeditor/ckeditor5-list-multi-level"; import { type StyleConfig } from "@ckeditor/ckeditor5-style"; import { type TableConfig } from "@ckeditor/ckeditor5-table"; import { type MediaEmbedConfig } from "@ckeditor/ckeditor5-media-embed"; import { type GeneralHtmlSupportConfig } from "@ckeditor/ckeditor5-html-support"; /** * Builds a compact, serializable snapshot of the editor's feature capabilities for the AI agent. * * The returned object is keyed by feature. A key is present only when the feature's plugin is loaded, so the agent * can tell at a glance what content the editor is able to produce: * * * For configurable features, the value is that feature's configuration with UI-only options stripped out * (toolbars, color pickers, icons, labels, keystrokes, dropdown limits, preview machinery, …), leaving only the * options that actually shape the document data. * * For features that expose no data-relevant configuration, the value is an empty object acting purely as a * presence flag. * * Knowing both which features are available and how they are configured (e.g. the allowed heading levels, font * sizes or table properties) lets the agent keep its edits within what the editor can represent. * * The live editor configuration is never mutated. * * @param editor The editor whose feature configuration is gathered. * @returns The editor's feature capabilities snapshot. */ export declare function getEditorConfig(editor: Editor): AIEditorConfig; export interface AIEditorConfig { alignment?: AlignmentConfig; codeBlock?: CodeBlockConfig; fontBackgroundColor?: FontColorConfig; fontColor?: FontColorConfig; fontFamily?: FontFamilyConfig; fontSize?: FontSizeConfig; footnotes?: FootnotesConfig; htmlSupport?: GeneralHtmlSupportConfig; heading?: HeadingConfig; highlight?: HighlightConfig; image?: ImageConfig; indentBlock?: IndentBlockConfig; lineHeight?: LineHeightConfig; link?: LinkConfig; list?: ListConfig; listMultiLevel?: MultiLevelListConfig; mediaEmbed?: MediaEmbedConfig; mention?: MentionConfig; mergeFields?: MergeFieldsConfig; style?: StyleConfig; table?: TableConfig; textPartLanguage?: Array; blockQuote?: object; bold?: object; bookmark?: object; code?: object; horizontalLine?: object; htmlEmbed?: object; italic?: object; math?: object; pageBreak?: object; paragraph?: object; restrictedEditing?: object; strikethrough?: object; subscript?: object; superscript?: object; tableOfContents?: object; title?: object; todoList?: object; underline?: object; }