UNPKG

1.08 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 table/tableproperties/commands/tablealignmentcommand
7 */
8import type { Editor } from 'ckeditor5/src/core.js';
9import TablePropertyCommand from './tablepropertycommand.js';
10/**
11 * The table alignment command.
12 *
13 * The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as
14 * the `'tableAlignment'` editor command.
15 *
16 * To change the alignment of the selected table, execute the command:
17 *
18 * ```ts
19 * editor.execute( 'tableAlignment', {
20 * value: 'right'
21 * } );
22 * ```
23 */
24export default class TableAlignmentCommand extends TablePropertyCommand {
25 /**
26 * Creates a new `TableAlignmentCommand` instance.
27 *
28 * @param editor An editor in which this command will be used.
29 * @param defaultValue The default value for the "alignment" attribute.
30 */
31 constructor(editor: Editor, defaultValue: string);
32}