UNPKG

1.33 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/tablecolumnresize/tablewidthscommand
7 */
8import type { Element } from 'ckeditor5/src/engine';
9import { Command } from 'ckeditor5/src/core';
10/**
11 * Command used by the {@link module:table/tablecolumnresize~TableColumnResize Table column resize feature} that
12 * updates the width of the whole table as well as its individual columns.
13 */
14export default class TableWidthsCommand extends Command {
15 /**
16 * @inheritDoc
17 */
18 refresh(): void;
19 /**
20 * Updated the `tableWidth` attribute of the table and the `columnWidth` attribute of the columns of that table.
21 */
22 execute(options?: TableWidthsCommandOptions): void;
23}
24export interface TableWidthsCommandOptions {
25 /**
26 * New value of the `columnWidths` attribute. Must be array of strings or string with comma-separated values.
27 * If skipped, the column widths information will be deleted.
28 */
29 columnWidths?: Array<string> | string;
30 /**
31 * The new table width. If skipped, the model attribute will be removed.
32 */
33 tableWidth?: string;
34 /**
35 * The table that is having the columns resized.
36 */
37 table?: Element;
38}