UNPKG

1.63 kBTypeScriptView Raw
1/**
2 * @license Copyright (c) 2003-2024, 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/imageupload/imageuploadui
7 */
8import { Plugin } from 'ckeditor5/src/core.js';
9/**
10 * The image upload button plugin.
11 *
12 * For a detailed overview, check the {@glink features/images/image-upload/image-upload Image upload feature} documentation.
13 *
14 * Adds the `'uploadImage'` button to the {@link module:ui/componentfactory~ComponentFactory UI component factory}
15 * and also the `imageUpload` button as an alias for backward compatibility.
16 *
17 * Adds the `'menuBar:uploadImage'` menu button to the {@link module:ui/componentfactory~ComponentFactory UI component factory}.
18 *
19 * It also integrates with the `insertImage` toolbar component and `menuBar:insertImage` menu component, which are the default components
20 * through which image upload is available.
21 */
22export default class ImageUploadUI extends Plugin {
23 /**
24 * @inheritDoc
25 */
26 static get pluginName(): "ImageUploadUI";
27 /**
28 * @inheritDoc
29 */
30 init(): void;
31 /**
32 * Creates the base for various kinds of the button component provided by this feature.
33 */
34 private _createButton;
35 /**
36 * Creates a simple toolbar button, with an icon and a tooltip.
37 */
38 private _createToolbarButton;
39 /**
40 * Creates a button for the dropdown view, with an icon, text and no tooltip.
41 */
42 private _createDropdownButton;
43 /**
44 * Creates a button for the menu bar.
45 */
46 private _createMenuBarButton;
47}