UNPKG

1.16 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/tablecellproperties/commands/tablecellbackgroundcolorcommand
7 */
8import type { Editor } from 'ckeditor5/src/core.js';
9import TableCellPropertyCommand from './tablecellpropertycommand.js';
10/**
11 * The table cell background color command.
12 *
13 * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
14 * the `'tableCellBackgroundColor'` editor command.
15 *
16 * To change the background color of selected cells, execute the command:
17 *
18 * ```ts
19 * editor.execute( 'tableCellBackgroundColor', {
20 * value: '#f00'
21 * } );
22 * ```
23 */
24export default class TableCellBackgroundColorCommand extends TableCellPropertyCommand {
25 /**
26 * Creates a new `TableCellBackgroundColorCommand` instance.
27 *
28 * @param editor An editor in which this command will be used.
29 * @param defaultValue The default value of the attribute.
30 */
31 constructor(editor: Editor, defaultValue: string);
32}