UNPKG

1.46 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/tablecellverticalalignmentcommand
7 */
8import type { Editor } from 'ckeditor5/src/core';
9import TableCellPropertyCommand from './tablecellpropertycommand';
10/**
11 * The table cell vertical alignment command.
12 *
13 * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
14 * the `'tableCellVerticalAlignment'` editor command.
15 *
16 * To change the vertical text alignment of selected cells, execute the command:
17 *
18 * ```ts
19 * editor.execute( 'tableCellVerticalAlignment', {
20 * value: 'top'
21 * } );
22 * ```
23 *
24 * The following values, corresponding to the
25 * [`vertical-align` CSS attribute](https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align), are allowed:
26 *
27 * * `'top'`
28 * * `'bottom'`
29 *
30 * The `'middle'` value is the default one so there is no need to set it.
31 */
32export default class TableCellVerticalAlignmentCommand extends TableCellPropertyCommand {
33 /**
34 * Creates a new `TableCellVerticalAlignmentCommand` instance.
35 *
36 * @param editor An editor in which this command will be used.
37 * @param defaultValue The default value for the "alignment" attribute.
38 */
39 constructor(editor: Editor, defaultValue: string);
40}