UNPKG

1.77 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 table/tableui
7 */
8import { Plugin } from 'ckeditor5/src/core';
9/**
10 * The table UI plugin. It introduces:
11 *
12 * * The `'insertTable'` dropdown,
13 * * The `'tableColumn'` dropdown,
14 * * The `'tableRow'` dropdown,
15 * * The `'mergeTableCells'` split button.
16 *
17 * The `'tableColumn'`, `'tableRow'` and `'mergeTableCells'` dropdowns work best with {@link module:table/tabletoolbar~TableToolbar}.
18 */
19export default class TableUI extends Plugin {
20 /**
21 * @inheritDoc
22 */
23 static get pluginName(): 'TableUI';
24 /**
25 * @inheritDoc
26 */
27 init(): void;
28 /**
29 * Creates a dropdown view from a set of options.
30 *
31 * @param label The dropdown button label.
32 * @param icon An icon for the dropdown button.
33 * @param options The list of options for the dropdown.
34 */
35 private _prepareDropdown;
36 /**
37 * Creates a dropdown view with a {@link module:ui/dropdown/button/splitbuttonview~SplitButtonView} for
38 * merge (and split)–related commands.
39 *
40 * @param label The dropdown button label.
41 * @param icon An icon for the dropdown button.
42 * @param options The list of options for the dropdown.
43 */
44 private _prepareMergeSplitButtonDropdown;
45 /**
46 * Injects a {@link module:ui/list/listview~ListView} into the passed dropdown with buttons
47 * which execute editor commands as configured in passed options.
48 *
49 * @param options The list of options for the dropdown.
50 * @returns Commands the list options are interacting with.
51 */
52 private _fillDropdownWithListOptions;
53}