UNPKG

1.58 kBTypeScriptView Raw
1/**
2 * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4 */
5/**
6 * @module editor-classic/classiceditorui
7 */
8import type { Editor } from 'ckeditor5/src/core';
9import { EditorUI } from 'ckeditor5/src/ui';
10import type ClassicEditorUIView from './classiceditoruiview';
11/**
12 * The classic editor UI class.
13 */
14export default class ClassicEditorUI extends EditorUI {
15 /**
16 * The main (top–most) view of the editor UI.
17 */
18 readonly view: ClassicEditorUIView;
19 /**
20 * A normalized `config.toolbar` object.
21 */
22 private readonly _toolbarConfig;
23 /**
24 * The element replacer instance used to hide the editor's source element.
25 */
26 private readonly _elementReplacer;
27 /**
28 * Creates an instance of the classic editor UI class.
29 *
30 * @param editor The editor instance.
31 * @param view The view of the UI.
32 */
33 constructor(editor: Editor, view: ClassicEditorUIView);
34 /**
35 * @inheritDoc
36 */
37 get element(): HTMLElement | null;
38 /**
39 * Initializes the UI.
40 *
41 * @param replacementElement The DOM element that will be the source for the created editor.
42 */
43 init(replacementElement: HTMLElement | null): void;
44 /**
45 * @inheritDoc
46 */
47 destroy(): void;
48 /**
49 * Initializes the editor toolbar.
50 */
51 private _initToolbar;
52 /**
53 * Enable the placeholder text on the editing root, if any was configured.
54 */
55 private _initPlaceholder;
56}