@ckeditor/ckeditor5-table 48.2.0-alpha.7 → 48.3.0-alpha.0
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
|
@@ -1,53 +1,53 @@
|
|
|
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 { Command } from
|
|
6
|
+
* @module table/commands/setheaderrowcommand
|
|
7
|
+
*/
|
|
8
|
+
import { Command } from "@ckeditor/ckeditor5-core";
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
10
|
+
* The header row command.
|
|
11
|
+
*
|
|
12
|
+
* The command is registered by {@link module:table/tableediting~TableEditing} as the `'setTableColumnHeader'` editor command.
|
|
13
|
+
*
|
|
14
|
+
* You can make the row containing the selected cell a [header](https://www.w3.org/TR/html50/tabular-data.html#the-th-element) by executing:
|
|
15
|
+
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* editor.execute( 'setTableRowHeader' );
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* **Note:** All preceding rows will also become headers. If the current row is already a header, executing this command
|
|
21
|
+
* will make it a regular row back again (including the following rows).
|
|
22
|
+
*/
|
|
23
23
|
export declare class SetHeaderRowCommand extends Command {
|
|
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
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Flag indicating whether the command is active. The command is active when the
|
|
26
|
+
* {@link module:engine/model/selection~ModelSelection} is in a header row.
|
|
27
|
+
*
|
|
28
|
+
* @observable
|
|
29
|
+
*/
|
|
30
|
+
value: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* @inheritDoc
|
|
33
|
+
*/
|
|
34
|
+
override refresh(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Executes the command.
|
|
37
|
+
*
|
|
38
|
+
* When the selection is in a non-header row, the command will set the `headingRows` table attribute to cover that row.
|
|
39
|
+
*
|
|
40
|
+
* When the selection is already in a header row, it will set `headingRows` so the heading section will end before that row.
|
|
41
|
+
*
|
|
42
|
+
* @fires execute
|
|
43
|
+
* @param options.forceValue If set, the command will set (`true`) or unset (`false`) the header rows according to
|
|
44
|
+
* the `forceValue` parameter instead of the current model state.
|
|
45
|
+
*/
|
|
46
|
+
override execute(options?: {
|
|
47
|
+
forceValue?: boolean;
|
|
48
|
+
}): void;
|
|
49
|
+
/**
|
|
50
|
+
* Checks if a table cell is in the heading section.
|
|
51
|
+
*/
|
|
52
|
+
private _isInHeading;
|
|
53
53
|
}
|
|
@@ -1,43 +1,43 @@
|
|
|
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 { Command, type Editor } from
|
|
6
|
+
* @module table/commands/splitcellcommand
|
|
7
|
+
*/
|
|
8
|
+
import { Command, type Editor } from "@ckeditor/ckeditor5-core";
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
* The split cell command.
|
|
11
|
+
*
|
|
12
|
+
* The command is registered by {@link module:table/tableediting~TableEditing} as the `'splitTableCellVertically'`
|
|
13
|
+
* and `'splitTableCellHorizontally'` editor commands.
|
|
14
|
+
*
|
|
15
|
+
* You can split any cell vertically or horizontally by executing this command. For example, to split the selected table cell vertically:
|
|
16
|
+
*
|
|
17
|
+
* ```ts
|
|
18
|
+
* editor.execute( 'splitTableCellVertically' );
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
21
|
export declare class SplitCellCommand extends Command {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
22
|
+
/**
|
|
23
|
+
* The direction that indicates which cell will be split.
|
|
24
|
+
*/
|
|
25
|
+
readonly direction: "horizontally" | "vertically";
|
|
26
|
+
/**
|
|
27
|
+
* Creates a new `SplitCellCommand` instance.
|
|
28
|
+
*
|
|
29
|
+
* @param editor The editor on which this command will be used.
|
|
30
|
+
* @param options.direction Indicates whether the command should split cells `'horizontally'` or `'vertically'`.
|
|
31
|
+
*/
|
|
32
|
+
constructor(editor: Editor, options?: {
|
|
33
|
+
direction?: "horizontally" | "vertically";
|
|
34
|
+
});
|
|
35
|
+
/**
|
|
36
|
+
* @inheritDoc
|
|
37
|
+
*/
|
|
38
|
+
override refresh(): void;
|
|
39
|
+
/**
|
|
40
|
+
* @inheritDoc
|
|
41
|
+
*/
|
|
42
|
+
override execute(): void;
|
|
43
43
|
}
|
|
@@ -1,102 +1,102 @@
|
|
|
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 { type Editor } from
|
|
9
|
-
import type { ViewElement, ModelElement, DowncastElementCreatorFunction, DowncastConversionApi } from
|
|
10
|
-
import { TableUtils } from
|
|
11
|
-
import type { TableConversionAdditionalSlot } from
|
|
6
|
+
* @module table/converters/downcast
|
|
7
|
+
*/
|
|
8
|
+
import { type Editor } from "@ckeditor/ckeditor5-core";
|
|
9
|
+
import type { ViewElement, ModelElement, DowncastElementCreatorFunction, DowncastConversionApi } from "@ckeditor/ckeditor5-engine";
|
|
10
|
+
import { TableUtils } from "../tableutils.js";
|
|
11
|
+
import type { TableConversionAdditionalSlot } from "../tableediting.js";
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
* Model table element to view table element conversion helper.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
17
|
export declare function downcastTable(tableUtils: TableUtils, options: DowncastTableOptions): DowncastElementCreatorFunction;
|
|
18
18
|
/**
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
* Model table row element to view `<tr>` element conversion helper.
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
* @returns Element creator.
|
|
23
|
+
*/
|
|
24
24
|
export declare function downcastRow(): DowncastElementCreatorFunction;
|
|
25
25
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
* Model table cell element to view `<td>` or `<th>` element conversion helper.
|
|
27
|
+
*
|
|
28
|
+
* This conversion helper will create proper `<th>` elements for table cells that are in the heading section (heading row or column)
|
|
29
|
+
* and `<td>` otherwise.
|
|
30
|
+
*
|
|
31
|
+
* @internal
|
|
32
|
+
* @param options.asWidget If set to `true`, the downcast conversion will produce a widget.
|
|
33
|
+
* @param options.cellTypeEnabled If returns `true`, the downcast conversion will use the `tableCellType` attribute to determine cell type.
|
|
34
|
+
* @returns Element creator.
|
|
35
|
+
*/
|
|
36
36
|
export declare function downcastCell(options: {
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
asWidget?: boolean;
|
|
38
|
+
cellTypeEnabled: () => boolean;
|
|
39
39
|
}): DowncastElementCreatorFunction;
|
|
40
40
|
/**
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
41
|
+
* Overrides paragraph inside table cell conversion.
|
|
42
|
+
*
|
|
43
|
+
* This converter:
|
|
44
|
+
* * should be used to override default paragraph conversion.
|
|
45
|
+
* * It will only convert `<paragraph>` placed directly inside `<tableCell>`.
|
|
46
|
+
* * For a single paragraph without attributes it returns `<span>` to simulate data table.
|
|
47
|
+
* * For all other cases it returns `<p>` element.
|
|
48
|
+
*
|
|
49
|
+
* @internal
|
|
50
|
+
* @param options.asWidget If set to `true`, the downcast conversion will produce a widget.
|
|
51
|
+
* @returns Element creator.
|
|
52
|
+
*/
|
|
53
53
|
export declare function convertParagraphInTableCell(options?: {
|
|
54
|
-
|
|
54
|
+
asWidget?: boolean;
|
|
55
55
|
}): DowncastElementCreatorFunction;
|
|
56
56
|
/**
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
* Checks if given model `<paragraph>` is an only child of a parent (`<tableCell>`) and if it has any attribute set.
|
|
58
|
+
*
|
|
59
|
+
* The paragraph should be converted in the editing view to:
|
|
60
|
+
*
|
|
61
|
+
* * If returned `true` - to a `<span class="ck-table-bogus-paragraph">`
|
|
62
|
+
* * If returned `false` - to a `<p>`
|
|
63
|
+
*
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
66
|
export declare function isSingleParagraphWithoutAttributes(modelElement: ModelElement): boolean;
|
|
67
67
|
/**
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
* Downcasts a plain table (also used in the clipboard pipeline).
|
|
69
|
+
*/
|
|
70
70
|
export declare function convertPlainTable(editor: Editor): DowncastElementCreatorFunction;
|
|
71
71
|
/**
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
* Downcasts a plain table caption (also used in the clipboard pipeline).
|
|
73
|
+
*/
|
|
74
74
|
export declare function convertPlainTableCaption(editor: Editor): DowncastElementCreatorFunction;
|
|
75
75
|
/**
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
* Downcasts a plain table.
|
|
77
|
+
*
|
|
78
|
+
* @param table Table model element.
|
|
79
|
+
* @param conversionApi The conversion API object.
|
|
80
|
+
* @param editor The editor instance.
|
|
81
|
+
* @returns Created element.
|
|
82
|
+
*/
|
|
83
83
|
export declare function downcastPlainTable(table: ModelElement, conversionApi: DowncastConversionApi, editor: Editor): ViewElement;
|
|
84
84
|
/**
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
* Registers border and background attributes converters for plain tables or when the clipboard pipeline is used.
|
|
86
|
+
*/
|
|
87
87
|
export declare function downcastTableBorderAndBackgroundAttributes(editor: Editor): void;
|
|
88
88
|
/**
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
* Options for the downcast table conversion.
|
|
90
|
+
*
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
93
|
export interface DowncastTableOptions {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
94
|
+
/**
|
|
95
|
+
* If set to `true`, the downcast conversion will produce a widget.
|
|
96
|
+
*/
|
|
97
|
+
asWidget?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Array of additional slot handlers.
|
|
100
|
+
*/
|
|
101
|
+
additionalSlots: Array<TableConversionAdditionalSlot>;
|
|
102
102
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
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 type { Model } from
|
|
6
|
+
* @module table/converters/table-caption-post-fixer
|
|
7
|
+
*/
|
|
8
|
+
import type { Model } from "@ckeditor/ckeditor5-engine";
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
* Injects a table caption post-fixer into the model.
|
|
11
|
+
*
|
|
12
|
+
* The role of the table caption post-fixer is to ensure that the table with caption have the correct structure
|
|
13
|
+
* after a {@link module:engine/model/model~Model#change `change()`} block was executed.
|
|
14
|
+
*
|
|
15
|
+
* The correct structure means that:
|
|
16
|
+
*
|
|
17
|
+
* * If there are many caption model element, they are merged into one model.
|
|
18
|
+
* * A final, merged caption model is placed at the end of the table.
|
|
19
|
+
*
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
22
|
export declare function injectTableCaptionPostFixer(model: Model): void;
|
|
@@ -1,34 +1,34 @@
|
|
|
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 type { Model } from
|
|
6
|
+
* @module table/converters/table-cell-paragraph-post-fixer
|
|
7
|
+
*/
|
|
8
|
+
import type { Model } from "@ckeditor/ckeditor5-engine";
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
10
|
+
* Injects a table cell post-fixer into the model which inserts a `paragraph` element into empty table cells.
|
|
11
|
+
*
|
|
12
|
+
* A table cell must contain at least one block element as a child. An empty table cell will have an empty `paragraph` as a child.
|
|
13
|
+
*
|
|
14
|
+
* ```xml
|
|
15
|
+
* <table>
|
|
16
|
+
* <tableRow>
|
|
17
|
+
* <tableCell></tableCell>
|
|
18
|
+
* </tableRow>
|
|
19
|
+
* </table>
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* Will be fixed to:
|
|
23
|
+
*
|
|
24
|
+
* ```xml
|
|
25
|
+
* <table>
|
|
26
|
+
* <tableRow>
|
|
27
|
+
* <tableCell><paragraph></paragraph></tableCell>
|
|
28
|
+
* </tableRow>
|
|
29
|
+
* </table>
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
34
|
export declare function injectTableCellParagraphPostFixer(model: Model): void;
|
|
@@ -1,20 +1,20 @@
|
|
|
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 type { EditingController, Model } from
|
|
6
|
+
* @module table/converters/table-cell-refresh-handler
|
|
7
|
+
*/
|
|
8
|
+
import type { EditingController, Model } from "@ckeditor/ckeditor5-engine";
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
* A table cell refresh handler which marks the table cell in the differ to have it re-rendered.
|
|
11
|
+
*
|
|
12
|
+
* Model `paragraph` inside a table cell can be rendered as `<span>` or `<p>`. It is rendered as `<span>` if this is the only block
|
|
13
|
+
* element in that table cell and it does not have any attributes. It is rendered as `<p>` otherwise.
|
|
14
|
+
*
|
|
15
|
+
* When table cell content changes, for example a second `paragraph` element is added, we need to ensure that the first `paragraph` is
|
|
16
|
+
* re-rendered so it changes from `<span>` to `<p>`. The easiest way to do it is to re-render the entire table cell.
|
|
17
|
+
*
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
20
|
export declare function tableCellRefreshHandler(model: Model, editing: EditingController): void;
|