UNPKG

1.2 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/tablecellproperties/commands/tablecellhorizontalalignmentcommand
7 */
8import type { Editor } from 'ckeditor5/src/core';
9import TableCellPropertyCommand from './tablecellpropertycommand';
10/**
11 * The table cell horizontal alignment command.
12 *
13 * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
14 * the `'tableCellHorizontalAlignment'` editor command.
15 *
16 * To change the horizontal text alignment of selected cells, execute the command:
17 *
18 * ```ts
19 * editor.execute( 'tableCellHorizontalAlignment', {
20 * value: 'right'
21 * } );
22 * ```
23 */
24export default class TableCellHorizontalAlignmentCommand extends TableCellPropertyCommand {
25 /**
26 * Creates a new `TableCellHorizontalAlignmentCommand` 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}