UNPKG

1.23 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/tablebordercolorcommand
7 */
8import type { Element } from 'ckeditor5/src/engine.js';
9import type { Editor } from 'ckeditor5/src/core.js';
10import TablePropertyCommand from './tablepropertycommand.js';
11/**
12 * The table border color command.
13 *
14 * The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as
15 * the `'tableBorderColor'` editor command.
16 *
17 * To change the border color of the selected table, execute the command:
18 *
19 * ```ts
20 * editor.execute( 'tableBorderColor', {
21 * value: '#f00'
22 * } );
23 * ```
24 */
25export default class TableBorderColorCommand extends TablePropertyCommand {
26 /**
27 * Creates a new `TableBorderColorCommand` instance.
28 *
29 * @param editor An editor in which this command will be used.
30 * @param defaultValue The default value of the attribute.
31 */
32 constructor(editor: Editor, defaultValue: string);
33 /**
34 * @inheritDoc
35 */
36 protected _getValue(table: Element): unknown;
37}