1 | import { Editor } from '@ckeditor/ckeditor5-core';
|
2 | import TablePropertyCommand from './tablepropertycommand';
|
3 |
|
4 | /**
|
5 | * The table width command.
|
6 | *
|
7 | * The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as
|
8 | * the `'tableWidth'` editor command.
|
9 | *
|
10 | * To change the width of the selected table, execute the command:
|
11 | *
|
12 | * editor.execute( 'tableWidth', {
|
13 | * value: '400px'
|
14 | * } );
|
15 | *
|
16 | * **Note**: This command adds the default `'px'` unit to numeric values. Executing:
|
17 | *
|
18 | * editor.execute( 'tableWidth', {
|
19 | * value: '50'
|
20 | * } );
|
21 | *
|
22 | * will set the `width` attribute to `'50px'` in the model.
|
23 | */
|
24 | export default class TableWidthCommand extends TablePropertyCommand {
|
25 | /**
|
26 | * Creates a new `TableWidthCommand` instance.
|
27 | */
|
28 | constructor(editor: Editor, defaultValue: string);
|
29 | readonly attributeName: 'width';
|
30 | }
|