UNPKG

@znuny/ckeditor5-autocomplete-plugin

Version:

A plugin for CKEditor 5 that provides an extendable autocomplete functionality with predefined mention and HTML replacement logic.

50 lines (49 loc) 1.43 kB
/** * @copyright Copyright (c) 2024, Znuny GmbH. * @copyright Copyright (c) 2003-2024, CKSource Holding sp. z o.o. * * @license GNU GPL version 3 * * This software comes with ABSOLUTELY NO WARRANTY. For details, see * the enclosed file COPYING for license information (GPL). If you * did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt. */ /** * @module mention/ui/domwrapperview */ import { View } from 'ckeditor5/src/ui.js'; import type { Locale } from 'ckeditor5/src/utils.js'; /** * This class wraps DOM element as a CKEditor5 UI View. * * It allows to render any DOM element and use it in mentions list. * * It is used for Autocomplete items, which uses a custom item.completionElementRenderer. */ export declare class DomWrapperView extends View { /** * The DOM element for which wrapper was created. */ domElement: HTMLElement; /** * Controls whether the dom wrapper view is "on". This is in line with {@link module:ui/button/button~Button#isOn} property. * * @observable * @default true */ isOn: boolean; /** * Creates an instance of {@link module:mention/ui/domwrapperview~DomWrapperView} class. * * Also see {@link #render}. */ constructor(locale: Locale, domElement: HTMLElement); /** * @inheritDoc */ render(): void; /** * Focuses the DOM element. */ focus(): void; }