@ckeditor/ckeditor5-table 48.2.0 → 48.3.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/augmentation.d.ts +80 -80
- package/dist/commands/insertcolumncommand.d.ts +50 -50
- package/dist/commands/insertrowcommand.d.ts +49 -49
- package/dist/commands/inserttablecommand.d.ts +43 -43
- package/dist/commands/inserttablelayoutcommand.d.ts +34 -34
- package/dist/commands/mergecellcommand.d.ts +63 -63
- package/dist/commands/mergecellscommand.d.ts +24 -24
- package/dist/commands/removecolumncommand.d.ts +24 -24
- package/dist/commands/removerowcommand.d.ts +24 -24
- package/dist/commands/selectcolumncommand.d.ts +28 -28
- package/dist/commands/selectrowcommand.d.ts +28 -28
- package/dist/commands/setfooterrowcommand.d.ts +48 -48
- package/dist/commands/setheadercolumncommand.d.ts +45 -45
- package/dist/commands/setheaderrowcommand.d.ts +48 -48
- package/dist/commands/splitcellcommand.d.ts +38 -38
- package/dist/converters/downcast.d.ts +77 -77
- package/dist/converters/table-caption-post-fixer.d.ts +18 -18
- package/dist/converters/table-cell-paragraph-post-fixer.d.ts +30 -30
- package/dist/converters/table-cell-refresh-handler.d.ts +16 -16
- package/dist/converters/table-layout-post-fixer.d.ts +224 -224
- package/dist/converters/table-structure-post-fixer.d.ts +16 -16
- package/dist/converters/table-structure-refresh-handler.d.ts +15 -15
- package/dist/converters/tableproperties.d.ts +98 -98
- package/dist/converters/upcasttable.d.ts +47 -47
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +98 -98
- package/dist/index.js +12835 -14503
- package/dist/index.js.map +1 -1
- package/dist/plaintableoutput.d.ts +28 -28
- package/dist/table.d.ts +39 -39
- package/dist/tablecaption/tablecaptionediting.d.ts +62 -62
- package/dist/tablecaption/tablecaptionui.d.ts +18 -18
- package/dist/tablecaption/toggletablecaptioncommand.d.ts +61 -61
- package/dist/tablecaption/utils.d.ts +31 -31
- package/dist/tablecaption.d.ts +23 -23
- package/dist/tablecellproperties/commands/tablecellbackgroundcolorcommand.d.ts +27 -27
- package/dist/tablecellproperties/commands/tablecellbordercolorcommand.d.ts +32 -32
- package/dist/tablecellproperties/commands/tablecellborderstylecommand.d.ts +32 -32
- package/dist/tablecellproperties/commands/tablecellborderwidthcommand.d.ts +46 -46
- package/dist/tablecellproperties/commands/tablecellheightcommand.d.ts +41 -41
- package/dist/tablecellproperties/commands/tablecellhorizontalalignmentcommand.d.ts +27 -27
- package/dist/tablecellproperties/commands/tablecellpaddingcommand.d.ts +46 -46
- package/dist/tablecellproperties/commands/tablecellpropertycommand.d.ts +79 -79
- package/dist/tablecellproperties/commands/tablecelltypecommand.d.ts +42 -42
- package/dist/tablecellproperties/commands/tablecellverticalalignmentcommand.d.ts +35 -35
- package/dist/tablecellproperties/tablecellpropertiesediting.d.ts +49 -49
- package/dist/tablecellproperties/tablecellpropertiesui.d.ts +123 -123
- package/dist/tablecellproperties/tablecellpropertiesutils.d.ts +13 -13
- package/dist/tablecellproperties/ui/tablecellpropertiesview.d.ts +257 -257
- package/dist/tablecellproperties.d.ts +29 -29
- package/dist/tablecellwidth/commands/tablecellwidthcommand.d.ts +41 -41
- package/dist/tablecellwidth/tablecellwidthediting.d.ts +28 -28
- package/dist/tableclipboard.d.ts +79 -79
- package/dist/tablecolumnresize/constants.d.ts +23 -23
- package/dist/tablecolumnresize/converters.d.ts +20 -20
- package/dist/tablecolumnresize/tablecolumnresizeediting.d.ts +184 -184
- package/dist/tablecolumnresize/tablewidthscommand.d.ts +31 -31
- package/dist/tablecolumnresize/utils.d.ts +127 -127
- package/dist/tablecolumnresize.d.ts +25 -25
- package/dist/tableconfig.d.ts +670 -670
- package/dist/tableediting.d.ts +99 -99
- package/dist/tablekeyboard.d.ts +67 -67
- package/dist/tablelayout/commands/tabletypecommand.d.ts +38 -38
- package/dist/tablelayout/tablelayoutediting.d.ts +58 -58
- package/dist/tablelayout/tablelayoutui.d.ts +27 -27
- package/dist/tablelayout.d.ts +25 -25
- package/dist/tablemouse/mouseeventsobserver.d.ts +54 -54
- package/dist/tablemouse.d.ts +47 -47
- package/dist/tableproperties/commands/tablealignmentcommand.d.ts +27 -27
- package/dist/tableproperties/commands/tablebackgroundcolorcommand.d.ts +27 -27
- package/dist/tableproperties/commands/tablebordercolorcommand.d.ts +32 -32
- package/dist/tableproperties/commands/tableborderstylecommand.d.ts +32 -32
- package/dist/tableproperties/commands/tableborderwidthcommand.d.ts +46 -46
- package/dist/tableproperties/commands/tableheightcommand.d.ts +41 -41
- package/dist/tableproperties/commands/tablepropertycommand.d.ts +64 -64
- package/dist/tableproperties/commands/tablewidthcommand.d.ts +41 -41
- package/dist/tableproperties/tablepropertiesediting.d.ts +48 -48
- package/dist/tableproperties/tablepropertiesui.d.ts +131 -131
- package/dist/tableproperties/ui/tablepropertiesview.d.ts +207 -207
- package/dist/tableproperties.d.ts +29 -29
- package/dist/tableselection.d.ts +106 -106
- package/dist/tabletoolbar.d.ts +31 -31
- package/dist/tableui.d.ts +53 -53
- package/dist/tableutils.d.ts +532 -532
- package/dist/tablewalker.d.ts +342 -350
- package/dist/ui/colorinputview.d.ts +137 -137
- package/dist/ui/inserttableview.d.ts +78 -78
- package/dist/utils/common.d.ts +58 -58
- package/dist/utils/structure.d.ts +229 -229
- package/dist/utils/table-properties.d.ts +92 -92
- package/dist/utils/ui/contextualballoon.d.ts +28 -28
- package/dist/utils/ui/table-properties.d.ts +195 -192
- package/dist/utils/ui/widget.d.ts +22 -22
- package/package.json +9 -9
package/dist/tableselection.d.ts
CHANGED
|
@@ -1,111 +1,111 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { Plugin } from
|
|
9
|
-
import type { ModelElement, ModelDocumentFragment } from
|
|
10
|
-
import { TableUtils } from
|
|
11
|
-
import
|
|
6
|
+
* @module table/tableselection
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
9
|
+
import type { ModelElement, ModelDocumentFragment } from "@ckeditor/ckeditor5-engine";
|
|
10
|
+
import { TableUtils } from "./tableutils.js";
|
|
11
|
+
import "../theme/tableselection.css";
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
* This plugin enables the advanced table cells, rows and columns selection.
|
|
14
|
+
* It is loaded automatically by the {@link module:table/table~Table} plugin.
|
|
15
|
+
*/
|
|
16
16
|
export declare class TableSelection extends Plugin {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
static get pluginName(): "TableSelection";
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
static override get isOfficialPlugin(): true;
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
static get requires(): PluginDependenciesOf<[TableUtils, TableUtils]>;
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
init(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Returns the currently selected table cells or `null` if it is not a table cells selection.
|
|
35
|
+
*/
|
|
36
|
+
getSelectedTableCells(): Array<ModelElement> | null;
|
|
37
|
+
/**
|
|
38
|
+
* Returns the selected table fragment as a document fragment.
|
|
39
|
+
*/
|
|
40
|
+
getSelectionAsFragment(): ModelDocumentFragment | null;
|
|
41
|
+
/**
|
|
42
|
+
* Sets the model selection based on given anchor and target cells (can be the same cell).
|
|
43
|
+
* Takes care of setting the backward flag.
|
|
44
|
+
*
|
|
45
|
+
* ```ts
|
|
46
|
+
* const modelRoot = editor.model.document.getRoot();
|
|
47
|
+
* const firstCell = modelRoot.getNodeByPath( [ 0, 0, 0 ] );
|
|
48
|
+
* const lastCell = modelRoot.getNodeByPath( [ 0, 0, 1 ] );
|
|
49
|
+
*
|
|
50
|
+
* const tableSelection = editor.plugins.get( 'TableSelection' );
|
|
51
|
+
* tableSelection.setCellSelection( firstCell, lastCell );
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
setCellSelection(anchorCell: ModelElement, targetCell: ModelElement): void;
|
|
55
|
+
/**
|
|
56
|
+
* Returns the focus cell from the current selection.
|
|
57
|
+
*/
|
|
58
|
+
getFocusCell(): ModelElement | null;
|
|
59
|
+
/**
|
|
60
|
+
* Returns the anchor cell from the current selection.
|
|
61
|
+
*/
|
|
62
|
+
getAnchorCell(): ModelElement | null;
|
|
63
|
+
/**
|
|
64
|
+
* Defines a selection converter which marks the selected cells with a specific class.
|
|
65
|
+
*
|
|
66
|
+
* The real DOM selection is put in the last cell. Since the order of ranges is dependent on whether the
|
|
67
|
+
* selection is backward or not, the last cell will usually be close to the "focus" end of the selection
|
|
68
|
+
* (a selection has anchor and focus).
|
|
69
|
+
*
|
|
70
|
+
* The real DOM selection is then hidden with CSS.
|
|
71
|
+
*/
|
|
72
|
+
private _defineSelectionConverter;
|
|
73
|
+
/**
|
|
74
|
+
* Creates a listener that reacts to changes in {@link #isEnabled} and, if the plugin was disabled,
|
|
75
|
+
* it collapses the multi-cell selection to a regular selection placed inside a table cell.
|
|
76
|
+
*
|
|
77
|
+
* This listener helps features that disable the table selection plugin bring the selection
|
|
78
|
+
* to a clear state they can work with (for instance, because they don't support multiple cell selection).
|
|
79
|
+
*/
|
|
80
|
+
private _enablePluginDisabling;
|
|
81
|
+
/**
|
|
82
|
+
* Overrides the default `model.deleteContent()` behavior over a selected table fragment.
|
|
83
|
+
*
|
|
84
|
+
* @param args Delete content method arguments.
|
|
85
|
+
*/
|
|
86
|
+
private _handleDeleteContent;
|
|
87
|
+
/**
|
|
88
|
+
* This handler makes it possible to remove the content of all selected cells by starting to type.
|
|
89
|
+
* If you take a look at {@link #_defineSelectionConverter} you will find out that despite the multi-cell selection being set
|
|
90
|
+
* in the model, the view selection is collapsed in the last cell (because most browsers are unable to render multi-cell selections;
|
|
91
|
+
* yes, it's a hack).
|
|
92
|
+
*
|
|
93
|
+
* When multiple cells are selected in the model and the user starts to type, the
|
|
94
|
+
* {@link module:engine/view/document~ViewDocument#event:insertText} event carries information provided by the
|
|
95
|
+
* beforeinput DOM event, that in turn only knows about this collapsed DOM selection in the last cell.
|
|
96
|
+
*
|
|
97
|
+
* As a result, the selected cells have no chance to be cleaned up. To fix this, this listener intercepts
|
|
98
|
+
* the event and injects the custom view selection in the data that translates correctly to the actual state
|
|
99
|
+
* of the multi-cell selection in the model.
|
|
100
|
+
*
|
|
101
|
+
* @param data Insert text event data.
|
|
102
|
+
*/
|
|
103
|
+
private _handleInsertTextEvent;
|
|
104
|
+
/**
|
|
105
|
+
* Returns an array of table cells that should be selected based on the
|
|
106
|
+
* given anchor cell and target (focus) cell.
|
|
107
|
+
*
|
|
108
|
+
* The cells are returned in a reverse direction if the selection is backward.
|
|
109
|
+
*/
|
|
110
|
+
private _getCellsToSelect;
|
|
111
111
|
}
|
package/dist/tabletoolbar.d.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { Plugin } from
|
|
9
|
-
import { WidgetToolbarRepository } from
|
|
6
|
+
* @module table/tabletoolbar
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
9
|
+
import { WidgetToolbarRepository } from "@ckeditor/ckeditor5-widget";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
* The table toolbar class. It creates toolbars for the table feature and its content (for now only for the table cell content).
|
|
12
|
+
*
|
|
13
|
+
* The table toolbar shows up when a table widget is selected. Its components (e.g. buttons) are created based on the
|
|
14
|
+
* {@link module:table/tableconfig~TableConfig#tableToolbar `table.tableToolbar` configuration option}.
|
|
15
|
+
*
|
|
16
|
+
* Table content toolbar shows up when the selection is inside the content of a table. It creates its component based on the
|
|
17
|
+
* {@link module:table/tableconfig~TableConfig#contentToolbar `table.contentToolbar` configuration option}.
|
|
18
|
+
*/
|
|
19
19
|
export declare class TableToolbar extends Plugin {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
static get requires(): PluginDependenciesOf<[WidgetToolbarRepository]>;
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
static get pluginName(): "TableToolbar";
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
static override get isOfficialPlugin(): true;
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
afterInit(): void;
|
|
36
36
|
}
|
package/dist/tableui.d.ts
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { Plugin } from
|
|
6
|
+
* @module table/tableui
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from "@ckeditor/ckeditor5-core";
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
* The table UI plugin. It introduces:
|
|
11
|
+
*
|
|
12
|
+
* * The `'insertTable'` dropdown,
|
|
13
|
+
* * The `'menuBar:insertTable'` menu bar menu,
|
|
14
|
+
* * The `'tableColumn'` dropdown,
|
|
15
|
+
* * The `'tableRow'` dropdown,
|
|
16
|
+
* * The `'mergeTableCells'` split button.
|
|
17
|
+
*
|
|
18
|
+
* The `'tableColumn'`, `'tableRow'` and `'mergeTableCells'` dropdowns work best with {@link module:table/tabletoolbar~TableToolbar}.
|
|
19
|
+
*/
|
|
20
20
|
export declare class TableUI extends Plugin {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
static get pluginName(): "TableUI";
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
static override get isOfficialPlugin(): true;
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
init(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Creates a dropdown view from a set of options.
|
|
35
|
+
*
|
|
36
|
+
* @param label The dropdown button label.
|
|
37
|
+
* @param icon An icon for the dropdown button.
|
|
38
|
+
* @param options The list of options for the dropdown.
|
|
39
|
+
*/
|
|
40
|
+
private _prepareDropdown;
|
|
41
|
+
/**
|
|
42
|
+
* Creates a dropdown view with a {@link module:ui/dropdown/button/splitbuttonview~SplitButtonView} for
|
|
43
|
+
* merge (and split)–related commands.
|
|
44
|
+
*
|
|
45
|
+
* @param label The dropdown button label.
|
|
46
|
+
* @param icon An icon for the dropdown button.
|
|
47
|
+
* @param options The list of options for the dropdown.
|
|
48
|
+
*/
|
|
49
|
+
private _prepareMergeSplitButtonDropdown;
|
|
50
|
+
/**
|
|
51
|
+
* Injects a {@link module:ui/list/listview~ListView} into the passed dropdown with buttons
|
|
52
|
+
* which execute editor commands as configured in passed options.
|
|
53
|
+
*
|
|
54
|
+
* @param options The list of options for the dropdown.
|
|
55
|
+
* @returns Commands the list options are interacting with.
|
|
56
|
+
*/
|
|
57
|
+
private _fillDropdownWithListOptions;
|
|
58
58
|
}
|