UNPKG

1.38 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 image/imageinsert/imageinsertui
7 */
8import { Plugin } from 'ckeditor5/src/core';
9import { type DropdownView } from 'ckeditor5/src/ui';
10/**
11 * The image insert dropdown plugin.
12 *
13 * For a detailed overview, check the {@glink features/images/image-upload/image-upload Image upload feature}
14 * and {@glink features/images/images-inserting Insert images via source URL} documentation.
15 *
16 * Adds the `'insertImage'` dropdown to the {@link module:ui/componentfactory~ComponentFactory UI component factory}
17 * and also the `imageInsert` dropdown as an alias for backward compatibility.
18 */
19export default class ImageInsertUI extends Plugin {
20 /**
21 * @inheritDoc
22 */
23 static get pluginName(): "ImageInsertUI";
24 /**
25 * The dropdown view responsible for displaying the image insert UI.
26 */
27 dropdownView?: DropdownView;
28 /**
29 * @inheritDoc
30 */
31 init(): void;
32 /**
33 * Creates the dropdown view.
34 *
35 * @param locale The localization services instance.
36 */
37 private _createDropdownView;
38 /**
39 * Sets up the dropdown view.
40 *
41 * @param command An uploadImage or insertImage command.
42 */
43 private _setUpDropdown;
44}