@ckeditor/ckeditor5-table 45.2.1-alpha.9 → 46.0.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/build/table.js +1 -1
- package/dist/index-content.css +6 -5
- package/dist/index-editor.css +46 -46
- package/dist/index.css +63 -62
- package/dist/index.css.map +1 -1
- package/dist/index.js +305 -49
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
- package/src/commands/insertcolumncommand.d.ts +1 -1
- package/src/commands/insertcolumncommand.js +1 -1
- package/src/commands/insertrowcommand.d.ts +1 -1
- package/src/commands/insertrowcommand.js +1 -1
- package/src/commands/inserttablecommand.d.ts +1 -1
- package/src/commands/inserttablecommand.js +1 -1
- package/src/commands/inserttablelayoutcommand.d.ts +1 -1
- package/src/commands/inserttablelayoutcommand.js +1 -1
- package/src/commands/mergecellcommand.d.ts +3 -3
- package/src/commands/mergecellcommand.js +2 -2
- package/src/commands/mergecellscommand.d.ts +1 -1
- package/src/commands/mergecellscommand.js +2 -2
- package/src/commands/removecolumncommand.d.ts +1 -1
- package/src/commands/removecolumncommand.js +2 -2
- package/src/commands/removerowcommand.d.ts +1 -1
- package/src/commands/removerowcommand.js +1 -1
- package/src/commands/selectcolumncommand.d.ts +1 -1
- package/src/commands/selectcolumncommand.js +2 -2
- package/src/commands/selectrowcommand.d.ts +1 -1
- package/src/commands/selectrowcommand.js +1 -1
- package/src/commands/setheadercolumncommand.d.ts +2 -2
- package/src/commands/setheadercolumncommand.js +1 -1
- package/src/commands/setheaderrowcommand.d.ts +2 -2
- package/src/commands/setheaderrowcommand.js +1 -1
- package/src/commands/splitcellcommand.d.ts +1 -1
- package/src/commands/splitcellcommand.js +1 -1
- package/src/converters/downcast.d.ts +21 -9
- package/src/converters/downcast.js +11 -3
- package/src/converters/table-caption-post-fixer.d.ts +3 -1
- package/src/converters/table-caption-post-fixer.js +3 -1
- package/src/converters/table-cell-paragraph-post-fixer.d.ts +3 -1
- package/src/converters/table-cell-paragraph-post-fixer.js +3 -1
- package/src/converters/table-cell-refresh-handler.d.ts +3 -1
- package/src/converters/table-cell-refresh-handler.js +3 -1
- package/src/converters/table-headings-refresh-handler.d.ts +3 -1
- package/src/converters/table-headings-refresh-handler.js +4 -2
- package/src/converters/table-layout-post-fixer.d.ts +3 -1
- package/src/converters/table-layout-post-fixer.js +4 -2
- package/src/converters/tableproperties.d.ts +17 -1
- package/src/converters/tableproperties.js +49 -2
- package/src/converters/upcasttable.d.ts +6 -1
- package/src/converters/upcasttable.js +6 -1
- package/src/index.d.ts +89 -56
- package/src/index.js +84 -24
- package/src/plaintableoutput.d.ts +2 -2
- package/src/plaintableoutput.js +2 -2
- package/src/table.d.ts +7 -7
- package/src/table.js +7 -7
- package/src/tablecaption/tablecaptionediting.d.ts +6 -6
- package/src/tablecaption/tablecaptionediting.js +8 -8
- package/src/tablecaption/tablecaptionui.d.ts +1 -1
- package/src/tablecaption/tablecaptionui.js +1 -1
- package/src/tablecaption/toggletablecaptioncommand.d.ts +1 -1
- package/src/tablecaption/toggletablecaptioncommand.js +1 -1
- package/src/tablecaption/utils.d.ts +8 -4
- package/src/tablecaption/utils.js +4 -0
- package/src/tablecaption.d.ts +3 -3
- package/src/tablecaption.js +3 -3
- package/src/tablecellproperties/commands/tablecellbackgroundcolorcommand.d.ts +2 -2
- package/src/tablecellproperties/commands/tablecellbackgroundcolorcommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellbordercolorcommand.d.ts +4 -4
- package/src/tablecellproperties/commands/tablecellbordercolorcommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellborderstylecommand.d.ts +4 -4
- package/src/tablecellproperties/commands/tablecellborderstylecommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellborderwidthcommand.d.ts +4 -4
- package/src/tablecellproperties/commands/tablecellborderwidthcommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellheightcommand.d.ts +2 -2
- package/src/tablecellproperties/commands/tablecellheightcommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellhorizontalalignmentcommand.d.ts +2 -2
- package/src/tablecellproperties/commands/tablecellhorizontalalignmentcommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellpaddingcommand.d.ts +4 -4
- package/src/tablecellproperties/commands/tablecellpaddingcommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellpropertycommand.d.ts +3 -3
- package/src/tablecellproperties/commands/tablecellpropertycommand.js +1 -1
- package/src/tablecellproperties/commands/tablecellverticalalignmentcommand.d.ts +2 -2
- package/src/tablecellproperties/commands/tablecellverticalalignmentcommand.js +2 -2
- package/src/tablecellproperties/tablecellpropertiesediting.d.ts +3 -3
- package/src/tablecellproperties/tablecellpropertiesediting.js +44 -19
- package/src/tablecellproperties/tablecellpropertiesui.d.ts +2 -2
- package/src/tablecellproperties/tablecellpropertiesui.js +2 -2
- package/src/tablecellproperties/ui/tablecellpropertiesview.d.ts +2 -2
- package/src/tablecellproperties/ui/tablecellpropertiesview.js +1 -1
- package/src/tablecellproperties.d.ts +3 -3
- package/src/tablecellproperties.js +3 -3
- package/src/tablecellwidth/commands/tablecellwidthcommand.d.ts +2 -2
- package/src/tablecellwidth/commands/tablecellwidthcommand.js +2 -2
- package/src/tablecellwidth/tablecellwidthediting.d.ts +2 -2
- package/src/tablecellwidth/tablecellwidthediting.js +5 -3
- package/src/tableclipboard.d.ts +6 -6
- package/src/tableclipboard.js +4 -4
- package/src/tablecolumnresize/constants.d.ts +9 -0
- package/src/tablecolumnresize/constants.js +9 -0
- package/src/tablecolumnresize/converters.d.ts +11 -1
- package/src/tablecolumnresize/converters.js +16 -0
- package/src/tablecolumnresize/tablecolumnresizeediting.d.ts +7 -7
- package/src/tablecolumnresize/tablecolumnresizeediting.js +13 -11
- package/src/tablecolumnresize/tablewidthscommand.d.ts +3 -3
- package/src/tablecolumnresize/tablewidthscommand.js +1 -1
- package/src/tablecolumnresize/utils.d.ts +23 -11
- package/src/tablecolumnresize/utils.js +14 -2
- package/src/tablecolumnresize.d.ts +3 -3
- package/src/tablecolumnresize.js +3 -3
- package/src/tableconfig.d.ts +3 -1
- package/src/tableediting.d.ts +7 -7
- package/src/tableediting.js +19 -19
- package/src/tablekeyboard.d.ts +8 -8
- package/src/tablekeyboard.js +7 -7
- package/src/tablelayout/commands/tabletypecommand.d.ts +1 -1
- package/src/tablelayout/commands/tabletypecommand.js +1 -1
- package/src/tablelayout/tablelayoutediting.d.ts +2 -2
- package/src/tablelayout/tablelayoutediting.js +4 -4
- package/src/tablelayout/tablelayoutui.d.ts +1 -1
- package/src/tablelayout/tablelayoutui.js +4 -4
- package/src/tablelayout.d.ts +5 -5
- package/src/tablelayout.js +5 -5
- package/src/tablemouse/mouseeventsobserver.d.ts +13 -11
- package/src/tablemouse/mouseeventsobserver.js +4 -2
- package/src/tablemouse.d.ts +3 -3
- package/src/tablemouse.js +4 -4
- package/src/tableproperties/commands/tablealignmentcommand.d.ts +2 -2
- package/src/tableproperties/commands/tablealignmentcommand.js +2 -2
- package/src/tableproperties/commands/tablebackgroundcolorcommand.d.ts +2 -2
- package/src/tableproperties/commands/tablebackgroundcolorcommand.js +2 -2
- package/src/tableproperties/commands/tablebordercolorcommand.d.ts +4 -4
- package/src/tableproperties/commands/tablebordercolorcommand.js +2 -2
- package/src/tableproperties/commands/tableborderstylecommand.d.ts +4 -4
- package/src/tableproperties/commands/tableborderstylecommand.js +2 -2
- package/src/tableproperties/commands/tableborderwidthcommand.d.ts +4 -4
- package/src/tableproperties/commands/tableborderwidthcommand.js +2 -2
- package/src/tableproperties/commands/tableheightcommand.d.ts +2 -2
- package/src/tableproperties/commands/tableheightcommand.js +2 -2
- package/src/tableproperties/commands/tablepropertycommand.d.ts +4 -4
- package/src/tableproperties/commands/tablepropertycommand.js +1 -1
- package/src/tableproperties/commands/tablewidthcommand.d.ts +2 -2
- package/src/tableproperties/commands/tablewidthcommand.js +2 -2
- package/src/tableproperties/tablepropertiesediting.d.ts +2 -2
- package/src/tableproperties/tablepropertiesediting.js +49 -21
- package/src/tableproperties/tablepropertiesui.d.ts +2 -2
- package/src/tableproperties/tablepropertiesui.js +2 -2
- package/src/tableproperties/ui/tablepropertiesview.d.ts +2 -2
- package/src/tableproperties/ui/tablepropertiesview.js +1 -1
- package/src/tableproperties.d.ts +3 -3
- package/src/tableproperties.js +3 -3
- package/src/tableselection.d.ts +9 -9
- package/src/tableselection.js +4 -4
- package/src/tabletoolbar.d.ts +1 -1
- package/src/tabletoolbar.js +1 -1
- package/src/tableui.d.ts +1 -1
- package/src/tableui.js +4 -4
- package/src/tableutils.d.ts +25 -26
- package/src/tableutils.js +4 -4
- package/src/tablewalker.d.ts +8 -8
- package/src/tablewalker.js +2 -2
- package/src/ui/colorinputview.d.ts +6 -1
- package/src/ui/colorinputview.js +1 -1
- package/src/ui/inserttableview.d.ts +3 -1
- package/src/ui/inserttableview.js +3 -1
- package/src/utils/common.d.ts +16 -7
- package/src/utils/common.js +9 -1
- package/src/utils/structure.d.ts +24 -14
- package/src/utils/structure.js +11 -1
- package/src/utils/table-properties.d.ts +15 -2
- package/src/utils/table-properties.js +6 -0
- package/src/utils/ui/contextualballoon.d.ts +4 -3
- package/src/utils/ui/contextualballoon.js +1 -0
- package/src/utils/ui/table-properties.d.ts +20 -7
- package/src/utils/ui/table-properties.js +24 -11
- package/src/utils/ui/widget.d.ts +6 -0
- package/src/utils/ui/widget.js +6 -0
- package/theme/tablecaption.css +9 -8
- package/theme/tablecolumnresize.css +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-table",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "46.0.0-alpha.0",
|
|
4
4
|
"description": "Table feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
"type": "module",
|
|
14
14
|
"main": "src/index.js",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"ckeditor5": "
|
|
17
|
-
"@ckeditor/ckeditor5-clipboard": "
|
|
18
|
-
"@ckeditor/ckeditor5-core": "
|
|
19
|
-
"@ckeditor/ckeditor5-engine": "
|
|
20
|
-
"@ckeditor/ckeditor5-icons": "
|
|
21
|
-
"@ckeditor/ckeditor5-ui": "
|
|
22
|
-
"@ckeditor/ckeditor5-utils": "
|
|
23
|
-
"@ckeditor/ckeditor5-widget": "
|
|
24
|
-
"es-toolkit": "1.
|
|
16
|
+
"ckeditor5": "46.0.0-alpha.0",
|
|
17
|
+
"@ckeditor/ckeditor5-clipboard": "46.0.0-alpha.0",
|
|
18
|
+
"@ckeditor/ckeditor5-core": "46.0.0-alpha.0",
|
|
19
|
+
"@ckeditor/ckeditor5-engine": "46.0.0-alpha.0",
|
|
20
|
+
"@ckeditor/ckeditor5-icons": "46.0.0-alpha.0",
|
|
21
|
+
"@ckeditor/ckeditor5-ui": "46.0.0-alpha.0",
|
|
22
|
+
"@ckeditor/ckeditor5-utils": "46.0.0-alpha.0",
|
|
23
|
+
"@ckeditor/ckeditor5-widget": "46.0.0-alpha.0",
|
|
24
|
+
"es-toolkit": "1.39.5"
|
|
25
25
|
},
|
|
26
26
|
"author": "CKSource (http://cksource.com/)",
|
|
27
27
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -24,7 +24,7 @@ import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
|
24
24
|
* editor.execute( 'insertTableColumnRight' );
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
|
-
export
|
|
27
|
+
export declare class InsertColumnCommand extends Command {
|
|
28
28
|
/**
|
|
29
29
|
* The order of insertion relative to the column in which the caret is located.
|
|
30
30
|
*/
|
|
@@ -24,7 +24,7 @@ import { Command } from 'ckeditor5/src/core.js';
|
|
|
24
24
|
* editor.execute( 'insertTableColumnRight' );
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
|
-
export
|
|
27
|
+
export class InsertColumnCommand extends Command {
|
|
28
28
|
/**
|
|
29
29
|
* The order of insertion relative to the column in which the caret is located.
|
|
30
30
|
*/
|
|
@@ -24,7 +24,7 @@ import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
|
24
24
|
* editor.execute( 'insertTableRowAbove' );
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
|
-
export
|
|
27
|
+
export declare class InsertRowCommand extends Command {
|
|
28
28
|
/**
|
|
29
29
|
* The order of insertion relative to the row in which the caret is located.
|
|
30
30
|
*/
|
|
@@ -24,7 +24,7 @@ import { Command } from 'ckeditor5/src/core.js';
|
|
|
24
24
|
* editor.execute( 'insertTableRowAbove' );
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
|
-
export
|
|
27
|
+
export class InsertRowCommand extends Command {
|
|
28
28
|
/**
|
|
29
29
|
* The order of insertion relative to the row in which the caret is located.
|
|
30
30
|
*/
|
|
@@ -17,7 +17,7 @@ import { Command } from 'ckeditor5/src/core.js';
|
|
|
17
17
|
* editor.execute( 'insertTable', { rows: 20, columns: 5 } );
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
20
|
+
export declare class InsertTableCommand extends Command {
|
|
21
21
|
/**
|
|
22
22
|
* @inheritDoc
|
|
23
23
|
*/
|
|
@@ -17,7 +17,7 @@ import { Command } from 'ckeditor5/src/core.js';
|
|
|
17
17
|
* editor.execute( 'insertTable', { rows: 20, columns: 5 } );
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
20
|
+
export class InsertTableCommand extends Command {
|
|
21
21
|
/**
|
|
22
22
|
* @inheritDoc
|
|
23
23
|
*/
|
|
@@ -18,7 +18,7 @@ import { Command } from 'ckeditor5/src/core.js';
|
|
|
18
18
|
* editor.execute( 'insertTableLayout', { rows: 20, columns: 5 } );
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
21
|
+
export declare class InsertTableLayoutCommand extends Command {
|
|
22
22
|
/**
|
|
23
23
|
* @inheritDoc
|
|
24
24
|
*/
|
|
@@ -18,7 +18,7 @@ import { Command } from 'ckeditor5/src/core.js';
|
|
|
18
18
|
* editor.execute( 'insertTableLayout', { rows: 20, columns: 5 } );
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
21
|
+
export class InsertTableLayoutCommand extends Command {
|
|
22
22
|
/**
|
|
23
23
|
* @inheritDoc
|
|
24
24
|
*/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module table/commands/mergecellcommand
|
|
7
7
|
*/
|
|
8
|
-
import type {
|
|
8
|
+
import type { ModelNode } from 'ckeditor5/src/engine.js';
|
|
9
9
|
import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
10
10
|
import type { ArrowKeyCodeDirection } from 'ckeditor5/src/utils.js';
|
|
11
11
|
/**
|
|
@@ -26,7 +26,7 @@ import type { ArrowKeyCodeDirection } from 'ckeditor5/src/utils.js';
|
|
|
26
26
|
* (for `'mergeTableCellRight'` and `'mergeTableCellLeft'`) or [`colspan`](https://www.w3.org/TR/html50/tabular-data.html#attr-tdth-colspan)
|
|
27
27
|
* (for `'mergeTableCellUp'` and `'mergeTableCellDown'`), the command will be disabled.
|
|
28
28
|
*/
|
|
29
|
-
export
|
|
29
|
+
export declare class MergeCellCommand extends Command {
|
|
30
30
|
/**
|
|
31
31
|
* The direction that indicates which cell will be merged with the currently selected one.
|
|
32
32
|
*/
|
|
@@ -38,7 +38,7 @@ export default class MergeCellCommand extends Command {
|
|
|
38
38
|
/**
|
|
39
39
|
* @inheritDoc
|
|
40
40
|
*/
|
|
41
|
-
value:
|
|
41
|
+
value: ModelNode | undefined;
|
|
42
42
|
/**
|
|
43
43
|
* Creates a new `MergeCellCommand` instance.
|
|
44
44
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
5
|
import { Command } from 'ckeditor5/src/core.js';
|
|
6
|
-
import TableWalker from '../tablewalker.js';
|
|
6
|
+
import { TableWalker } from '../tablewalker.js';
|
|
7
7
|
import { isHeadingColumnCell } from '../utils/common.js';
|
|
8
8
|
import { removeEmptyRowsColumns } from '../utils/structure.js';
|
|
9
9
|
/**
|
|
@@ -24,7 +24,7 @@ import { removeEmptyRowsColumns } from '../utils/structure.js';
|
|
|
24
24
|
* (for `'mergeTableCellRight'` and `'mergeTableCellLeft'`) or [`colspan`](https://www.w3.org/TR/html50/tabular-data.html#attr-tdth-colspan)
|
|
25
25
|
* (for `'mergeTableCellUp'` and `'mergeTableCellDown'`), the command will be disabled.
|
|
26
26
|
*/
|
|
27
|
-
export
|
|
27
|
+
export class MergeCellCommand extends Command {
|
|
28
28
|
/**
|
|
29
29
|
* The direction that indicates which cell will be merged with the currently selected one.
|
|
30
30
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
5
|
import { Command } from 'ckeditor5/src/core.js';
|
|
6
|
-
import TableUtils from '../tableutils.js';
|
|
6
|
+
import { TableUtils } from '../tableutils.js';
|
|
7
7
|
import { updateNumericAttribute } from '../utils/common.js';
|
|
8
8
|
import { removeEmptyRowsColumns } from '../utils/structure.js';
|
|
9
9
|
/**
|
|
@@ -17,7 +17,7 @@ import { removeEmptyRowsColumns } from '../utils/structure.js';
|
|
|
17
17
|
* editor.execute( 'mergeTableCells' );
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
20
|
+
export class MergeCellsCommand extends Command {
|
|
21
21
|
/**
|
|
22
22
|
* @inheritDoc
|
|
23
23
|
*/
|
|
@@ -17,7 +17,7 @@ import { Command } from 'ckeditor5/src/core.js';
|
|
|
17
17
|
* editor.execute( 'removeTableColumn' );
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
20
|
+
export declare class RemoveColumnCommand extends Command {
|
|
21
21
|
/**
|
|
22
22
|
* @inheritDoc
|
|
23
23
|
*/
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @module table/commands/removecolumncommand
|
|
7
7
|
*/
|
|
8
8
|
import { Command } from 'ckeditor5/src/core.js';
|
|
9
|
-
import TableWalker from '../tablewalker.js';
|
|
9
|
+
import { TableWalker } from '../tablewalker.js';
|
|
10
10
|
/**
|
|
11
11
|
* The remove column command.
|
|
12
12
|
*
|
|
@@ -18,7 +18,7 @@ import TableWalker from '../tablewalker.js';
|
|
|
18
18
|
* editor.execute( 'removeTableColumn' );
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
21
|
+
export class RemoveColumnCommand extends Command {
|
|
22
22
|
/**
|
|
23
23
|
* @inheritDoc
|
|
24
24
|
*/
|
|
@@ -17,7 +17,7 @@ import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
|
17
17
|
* editor.execute( 'selectTableColumn' );
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
20
|
+
export declare class SelectColumnCommand extends Command {
|
|
21
21
|
/**
|
|
22
22
|
* @inheritDoc
|
|
23
23
|
*/
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @module table/commands/selectcolumncommand
|
|
7
7
|
*/
|
|
8
8
|
import { Command } from 'ckeditor5/src/core.js';
|
|
9
|
-
import TableWalker from '../tablewalker.js';
|
|
9
|
+
import { TableWalker } from '../tablewalker.js';
|
|
10
10
|
/**
|
|
11
11
|
* The select column command.
|
|
12
12
|
*
|
|
@@ -18,7 +18,7 @@ import TableWalker from '../tablewalker.js';
|
|
|
18
18
|
* editor.execute( 'selectTableColumn' );
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
21
|
+
export class SelectColumnCommand extends Command {
|
|
22
22
|
/**
|
|
23
23
|
* @inheritDoc
|
|
24
24
|
*/
|
|
@@ -17,7 +17,7 @@ import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
|
17
17
|
* editor.execute( 'selectTableRow' );
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
20
|
+
export declare class SelectRowCommand extends Command {
|
|
21
21
|
/**
|
|
22
22
|
* @inheritDoc
|
|
23
23
|
*/
|
|
@@ -21,10 +21,10 @@ import { Command } from 'ckeditor5/src/core.js';
|
|
|
21
21
|
* **Note:** All preceding columns will also become headers. If the current column is already a header, executing this command
|
|
22
22
|
* will make it a regular column back again (including the following columns).
|
|
23
23
|
*/
|
|
24
|
-
export
|
|
24
|
+
export declare class SetHeaderColumnCommand extends Command {
|
|
25
25
|
/**
|
|
26
26
|
* Flag indicating whether the command is active. The command is active when the
|
|
27
|
-
* {@link module:engine/model/selection~
|
|
27
|
+
* {@link module:engine/model/selection~ModelSelection} is in a header column.
|
|
28
28
|
*
|
|
29
29
|
* @observable
|
|
30
30
|
*/
|
|
@@ -23,7 +23,7 @@ import { getHorizontallyOverlappingCells, splitVertically } from '../utils/struc
|
|
|
23
23
|
* **Note:** All preceding columns will also become headers. If the current column is already a header, executing this command
|
|
24
24
|
* will make it a regular column back again (including the following columns).
|
|
25
25
|
*/
|
|
26
|
-
export
|
|
26
|
+
export class SetHeaderColumnCommand extends Command {
|
|
27
27
|
/**
|
|
28
28
|
* @inheritDoc
|
|
29
29
|
*/
|
|
@@ -20,10 +20,10 @@ import { Command } from 'ckeditor5/src/core.js';
|
|
|
20
20
|
* **Note:** All preceding rows will also become headers. If the current row is already a header, executing this command
|
|
21
21
|
* will make it a regular row back again (including the following rows).
|
|
22
22
|
*/
|
|
23
|
-
export
|
|
23
|
+
export declare class SetHeaderRowCommand extends Command {
|
|
24
24
|
/**
|
|
25
25
|
* Flag indicating whether the command is active. The command is active when the
|
|
26
|
-
* {@link module:engine/model/selection~
|
|
26
|
+
* {@link module:engine/model/selection~ModelSelection} is in a header row.
|
|
27
27
|
*
|
|
28
28
|
* @observable
|
|
29
29
|
*/
|
|
@@ -22,7 +22,7 @@ import { getVerticallyOverlappingCells, splitHorizontally } from '../utils/struc
|
|
|
22
22
|
* **Note:** All preceding rows will also become headers. If the current row is already a header, executing this command
|
|
23
23
|
* will make it a regular row back again (including the following rows).
|
|
24
24
|
*/
|
|
25
|
-
export
|
|
25
|
+
export class SetHeaderRowCommand extends Command {
|
|
26
26
|
/**
|
|
27
27
|
* @inheritDoc
|
|
28
28
|
*/
|
|
@@ -18,7 +18,7 @@ import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
|
18
18
|
* editor.execute( 'splitTableCellVertically' );
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
21
|
+
export declare class SplitCellCommand extends Command {
|
|
22
22
|
/**
|
|
23
23
|
* The direction that indicates which cell will be split.
|
|
24
24
|
*/
|
|
@@ -18,7 +18,7 @@ import { Command } from 'ckeditor5/src/core.js';
|
|
|
18
18
|
* editor.execute( 'splitTableCellVertically' );
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
21
|
+
export class SplitCellCommand extends Command {
|
|
22
22
|
/**
|
|
23
23
|
* The direction that indicates which cell will be split.
|
|
24
24
|
*/
|
|
@@ -2,31 +2,35 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
|
-
import type {
|
|
6
|
-
import type TableUtils from '../tableutils.js';
|
|
7
|
-
import type {
|
|
5
|
+
import type { ModelElement, DowncastElementCreatorFunction } from 'ckeditor5/src/engine.js';
|
|
6
|
+
import { type TableUtils } from '../tableutils.js';
|
|
7
|
+
import type { TableConversionAdditionalSlot } from '../tableediting.js';
|
|
8
8
|
/**
|
|
9
9
|
* Model table element to view table element conversion helper.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
10
12
|
*/
|
|
11
|
-
export declare function downcastTable(tableUtils: TableUtils, options: DowncastTableOptions):
|
|
13
|
+
export declare function downcastTable(tableUtils: TableUtils, options: DowncastTableOptions): DowncastElementCreatorFunction;
|
|
12
14
|
/**
|
|
13
15
|
* Model table row element to view `<tr>` element conversion helper.
|
|
14
16
|
*
|
|
17
|
+
* @internal
|
|
15
18
|
* @returns Element creator.
|
|
16
19
|
*/
|
|
17
|
-
export declare function downcastRow():
|
|
20
|
+
export declare function downcastRow(): DowncastElementCreatorFunction;
|
|
18
21
|
/**
|
|
19
22
|
* Model table cell element to view `<td>` or `<th>` element conversion helper.
|
|
20
23
|
*
|
|
21
24
|
* This conversion helper will create proper `<th>` elements for table cells that are in the heading section (heading row or column)
|
|
22
25
|
* and `<td>` otherwise.
|
|
23
26
|
*
|
|
27
|
+
* @internal
|
|
24
28
|
* @param options.asWidget If set to `true`, the downcast conversion will produce a widget.
|
|
25
29
|
* @returns Element creator.
|
|
26
30
|
*/
|
|
27
31
|
export declare function downcastCell(options?: {
|
|
28
32
|
asWidget?: boolean;
|
|
29
|
-
}):
|
|
33
|
+
}): DowncastElementCreatorFunction;
|
|
30
34
|
/**
|
|
31
35
|
* Overrides paragraph inside table cell conversion.
|
|
32
36
|
*
|
|
@@ -36,12 +40,13 @@ export declare function downcastCell(options?: {
|
|
|
36
40
|
* * For a single paragraph without attributes it returns `<span>` to simulate data table.
|
|
37
41
|
* * For all other cases it returns `<p>` element.
|
|
38
42
|
*
|
|
43
|
+
* @internal
|
|
39
44
|
* @param options.asWidget If set to `true`, the downcast conversion will produce a widget.
|
|
40
45
|
* @returns Element creator.
|
|
41
46
|
*/
|
|
42
47
|
export declare function convertParagraphInTableCell(options?: {
|
|
43
48
|
asWidget?: boolean;
|
|
44
|
-
}):
|
|
49
|
+
}): DowncastElementCreatorFunction;
|
|
45
50
|
/**
|
|
46
51
|
* Checks if given model `<paragraph>` is an only child of a parent (`<tableCell>`) and if it has any attribute set.
|
|
47
52
|
*
|
|
@@ -49,8 +54,15 @@ export declare function convertParagraphInTableCell(options?: {
|
|
|
49
54
|
*
|
|
50
55
|
* * If returned `true` - to a `<span class="ck-table-bogus-paragraph">`
|
|
51
56
|
* * If returned `false` - to a `<p>`
|
|
57
|
+
*
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
export declare function isSingleParagraphWithoutAttributes(modelElement: ModelElement): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Options for the downcast table conversion.
|
|
63
|
+
*
|
|
64
|
+
* @internal
|
|
52
65
|
*/
|
|
53
|
-
export declare function isSingleParagraphWithoutAttributes(modelElement: Element): boolean;
|
|
54
66
|
export interface DowncastTableOptions {
|
|
55
67
|
/**
|
|
56
68
|
* If set to `true`, the downcast conversion will produce a widget.
|
|
@@ -59,5 +71,5 @@ export interface DowncastTableOptions {
|
|
|
59
71
|
/**
|
|
60
72
|
* Array of additional slot handlers.
|
|
61
73
|
*/
|
|
62
|
-
additionalSlots: Array<
|
|
74
|
+
additionalSlots: Array<TableConversionAdditionalSlot>;
|
|
63
75
|
}
|
|
@@ -6,9 +6,11 @@
|
|
|
6
6
|
* @module table/converters/downcast
|
|
7
7
|
*/
|
|
8
8
|
import { toWidget, toWidgetEditable } from 'ckeditor5/src/widget.js';
|
|
9
|
-
import TableWalker from './../tablewalker.js';
|
|
9
|
+
import { TableWalker } from './../tablewalker.js';
|
|
10
10
|
/**
|
|
11
11
|
* Model table element to view table element conversion helper.
|
|
12
|
+
*
|
|
13
|
+
* @internal
|
|
12
14
|
*/
|
|
13
15
|
export function downcastTable(tableUtils, options) {
|
|
14
16
|
return (table, { writer }) => {
|
|
@@ -40,6 +42,7 @@ export function downcastTable(tableUtils, options) {
|
|
|
40
42
|
/**
|
|
41
43
|
* Model table row element to view `<tr>` element conversion helper.
|
|
42
44
|
*
|
|
45
|
+
* @internal
|
|
43
46
|
* @returns Element creator.
|
|
44
47
|
*/
|
|
45
48
|
export function downcastRow() {
|
|
@@ -55,6 +58,7 @@ export function downcastRow() {
|
|
|
55
58
|
* This conversion helper will create proper `<th>` elements for table cells that are in the heading section (heading row or column)
|
|
56
59
|
* and `<td>` otherwise.
|
|
57
60
|
*
|
|
61
|
+
* @internal
|
|
58
62
|
* @param options.asWidget If set to `true`, the downcast conversion will produce a widget.
|
|
59
63
|
* @returns Element creator.
|
|
60
64
|
*/
|
|
@@ -90,6 +94,7 @@ export function downcastCell(options = {}) {
|
|
|
90
94
|
* * For a single paragraph without attributes it returns `<span>` to simulate data table.
|
|
91
95
|
* * For all other cases it returns `<p>` element.
|
|
92
96
|
*
|
|
97
|
+
* @internal
|
|
93
98
|
* @param options.asWidget If set to `true`, the downcast conversion will produce a widget.
|
|
94
99
|
* @returns Element creator.
|
|
95
100
|
*/
|
|
@@ -119,6 +124,8 @@ export function convertParagraphInTableCell(options = {}) {
|
|
|
119
124
|
*
|
|
120
125
|
* * If returned `true` - to a `<span class="ck-table-bogus-paragraph">`
|
|
121
126
|
* * If returned `false` - to a `<p>`
|
|
127
|
+
*
|
|
128
|
+
* @internal
|
|
122
129
|
*/
|
|
123
130
|
export function isSingleParagraphWithoutAttributes(modelElement) {
|
|
124
131
|
const tableCell = modelElement.parent;
|
|
@@ -126,8 +133,9 @@ export function isSingleParagraphWithoutAttributes(modelElement) {
|
|
|
126
133
|
return isSingleParagraph && !hasAnyAttribute(modelElement);
|
|
127
134
|
}
|
|
128
135
|
/**
|
|
129
|
-
* Converts a given {@link module:engine/view/element~
|
|
130
|
-
* * Adds a {@link module:engine/view/element~
|
|
136
|
+
* Converts a given {@link module:engine/view/element~ViewElement} to a table widget:
|
|
137
|
+
* * Adds a {@link module:engine/view/element~ViewElement#_setCustomProperty custom property}
|
|
138
|
+
* allowing to recognize the table widget element.
|
|
131
139
|
* * Calls the {@link module:widget/utils~toWidget} function with the proper element's label creator.
|
|
132
140
|
*
|
|
133
141
|
* @param writer An instance of the view writer.
|
|
@@ -16,5 +16,7 @@ import type { Model } from 'ckeditor5/src/engine.js';
|
|
|
16
16
|
*
|
|
17
17
|
* * If there are many caption model element, they are merged into one model.
|
|
18
18
|
* * A final, merged caption model is placed at the end of the table.
|
|
19
|
+
*
|
|
20
|
+
* @internal
|
|
19
21
|
*/
|
|
20
|
-
export
|
|
22
|
+
export declare function injectTableCaptionPostFixer(model: Model): void;
|
|
@@ -12,8 +12,10 @@
|
|
|
12
12
|
*
|
|
13
13
|
* * If there are many caption model element, they are merged into one model.
|
|
14
14
|
* * A final, merged caption model is placed at the end of the table.
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
15
17
|
*/
|
|
16
|
-
export
|
|
18
|
+
export function injectTableCaptionPostFixer(model) {
|
|
17
19
|
model.document.registerPostFixer(writer => tableCaptionPostFixer(writer, model));
|
|
18
20
|
}
|
|
19
21
|
/**
|
|
@@ -28,5 +28,7 @@ import type { Model } from 'ckeditor5/src/engine.js';
|
|
|
28
28
|
* </tableRow>
|
|
29
29
|
* </table>
|
|
30
30
|
* ```
|
|
31
|
+
*
|
|
32
|
+
* @internal
|
|
31
33
|
*/
|
|
32
|
-
export
|
|
34
|
+
export declare function injectTableCellParagraphPostFixer(model: Model): void;
|
|
@@ -24,8 +24,10 @@
|
|
|
24
24
|
* </tableRow>
|
|
25
25
|
* </table>
|
|
26
26
|
* ```
|
|
27
|
+
*
|
|
28
|
+
* @internal
|
|
27
29
|
*/
|
|
28
|
-
export
|
|
30
|
+
export function injectTableCellParagraphPostFixer(model) {
|
|
29
31
|
model.document.registerPostFixer(writer => tableCellContentsPostFixer(writer, model));
|
|
30
32
|
}
|
|
31
33
|
/**
|
|
@@ -14,5 +14,7 @@ import type { EditingController, Model } from 'ckeditor5/src/engine.js';
|
|
|
14
14
|
*
|
|
15
15
|
* When table cell content changes, for example a second `paragraph` element is added, we need to ensure that the first `paragraph` is
|
|
16
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
|
|
17
19
|
*/
|
|
18
|
-
export
|
|
20
|
+
export declare function tableCellRefreshHandler(model: Model, editing: EditingController): void;
|
|
@@ -11,8 +11,10 @@ import { isSingleParagraphWithoutAttributes } from './downcast.js';
|
|
|
11
11
|
*
|
|
12
12
|
* When table cell content changes, for example a second `paragraph` element is added, we need to ensure that the first `paragraph` is
|
|
13
13
|
* re-rendered so it changes from `<span>` to `<p>`. The easiest way to do it is to re-render the entire table cell.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
14
16
|
*/
|
|
15
|
-
export
|
|
17
|
+
export function tableCellRefreshHandler(model, editing) {
|
|
16
18
|
const differ = model.document.differ;
|
|
17
19
|
// Stores cells to be refreshed, so the table cell will be refreshed once for multiple changes.
|
|
18
20
|
const cellsToCheck = new Set();
|
|
@@ -13,5 +13,7 @@ import type { EditingController, Model } from 'ckeditor5/src/engine.js';
|
|
|
13
13
|
* Table heading rows and heading columns are represented in the model by a `headingRows` and `headingColumns` attributes.
|
|
14
14
|
*
|
|
15
15
|
* When table headings attribute changes, all the cells/rows are marked to re-render to change between `<td>` and `<th>`.
|
|
16
|
+
*
|
|
17
|
+
* @internal
|
|
16
18
|
*/
|
|
17
|
-
export
|
|
19
|
+
export declare function tableHeadingsRefreshHandler(model: Model, editing: EditingController): void;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
|
-
import TableWalker from '../tablewalker.js';
|
|
5
|
+
import { TableWalker } from '../tablewalker.js';
|
|
6
6
|
/**
|
|
7
7
|
* A table headings refresh handler which marks the table cells or rows in the differ to have it re-rendered
|
|
8
8
|
* if the headings attribute changed.
|
|
@@ -10,8 +10,10 @@ import TableWalker from '../tablewalker.js';
|
|
|
10
10
|
* Table heading rows and heading columns are represented in the model by a `headingRows` and `headingColumns` attributes.
|
|
11
11
|
*
|
|
12
12
|
* When table headings attribute changes, all the cells/rows are marked to re-render to change between `<td>` and `<th>`.
|
|
13
|
+
*
|
|
14
|
+
* @internal
|
|
13
15
|
*/
|
|
14
|
-
export
|
|
16
|
+
export function tableHeadingsRefreshHandler(model, editing) {
|
|
15
17
|
const differ = model.document.differ;
|
|
16
18
|
for (const change of differ.getChanges()) {
|
|
17
19
|
let table;
|
|
@@ -222,5 +222,7 @@ import type { Model } from 'ckeditor5/src/engine.js';
|
|
|
222
222
|
* </tbody>
|
|
223
223
|
* </table>
|
|
224
224
|
* ```
|
|
225
|
+
*
|
|
226
|
+
* @internal
|
|
225
227
|
*/
|
|
226
|
-
export
|
|
228
|
+
export declare function injectTableLayoutPostFixer(model: Model): void;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
|
-
import TableWalker from './../tablewalker.js';
|
|
5
|
+
import { TableWalker } from './../tablewalker.js';
|
|
6
6
|
import { createEmptyTableCell, updateNumericAttribute } from '../utils/common.js';
|
|
7
7
|
/**
|
|
8
8
|
* Injects a table layout post-fixer into the model.
|
|
@@ -220,8 +220,10 @@ import { createEmptyTableCell, updateNumericAttribute } from '../utils/common.js
|
|
|
220
220
|
* </tbody>
|
|
221
221
|
* </table>
|
|
222
222
|
* ```
|
|
223
|
+
*
|
|
224
|
+
* @internal
|
|
223
225
|
*/
|
|
224
|
-
export
|
|
226
|
+
export function injectTableLayoutPostFixer(model) {
|
|
225
227
|
model.document.registerPostFixer(writer => tableLayoutPostFixer(writer, model));
|
|
226
228
|
}
|
|
227
229
|
/**
|