@ckeditor/ckeditor5-vue
Version:
Official Vue.js 3+ component for CKEditor 5 – the best browser-based rich text editor.
38 lines (37 loc) • 1.38 kB
TypeScript
/**
* @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
*/
/**
* Normalizes an editor element definition into a structured object.
*
* @param definition The definition to normalize.
* @returns A strictly typed object definition containing at least the element name.
*/
export declare function normalizeEditorElementDefinition(definition: EditorElementDefinition): EditorElementObjectDefinition;
/**
* Defines an editor element. It can be a tag name string or a detailed configuration object.
*/
export type EditorElementDefinition = string | EditorElementObjectDefinition;
/**
* An object-based definition for an editor element, allowing customization
* of classes, styles, and HTML attributes.
*/
export type EditorElementObjectDefinition = {
/**
* The DOM tag name to use.
*/
name: string;
/**
* Class name or array of class names to apply to the editable element. Each name can be provided as a string.
*/
classes?: string | Array<string>;
/**
* Inline styles to apply to the editable element as a record of style properties.
*/
styles?: Record<string, string>;
/**
* Additional DOM attributes to apply to the editable element.
*/
attributes?: Record<string, string>;
};