@ckeditor/ckeditor5-table 41.3.0 → 41.4.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/index-content.css +55 -0
- package/dist/index-editor.css +150 -0
- package/dist/index.css +362 -0
- package/dist/index.css.map +1 -0
- package/dist/index.js +10464 -0
- package/dist/index.js.map +1 -0
- package/dist/translations/ar.d.ts +8 -0
- package/dist/translations/ar.js +5 -0
- package/dist/translations/az.d.ts +8 -0
- package/dist/translations/az.js +5 -0
- package/dist/translations/bg.d.ts +8 -0
- package/dist/translations/bg.js +5 -0
- package/dist/translations/bn.d.ts +8 -0
- package/dist/translations/bn.js +5 -0
- package/dist/translations/ca.d.ts +8 -0
- package/dist/translations/ca.js +5 -0
- package/dist/translations/cs.d.ts +8 -0
- package/dist/translations/cs.js +5 -0
- package/dist/translations/da.d.ts +8 -0
- package/dist/translations/da.js +5 -0
- package/dist/translations/de-ch.d.ts +8 -0
- package/dist/translations/de-ch.js +5 -0
- package/dist/translations/de.d.ts +8 -0
- package/dist/translations/de.js +5 -0
- package/dist/translations/el.d.ts +8 -0
- package/dist/translations/el.js +5 -0
- package/dist/translations/en-au.d.ts +8 -0
- package/dist/translations/en-au.js +5 -0
- package/dist/translations/en-gb.d.ts +8 -0
- package/dist/translations/en-gb.js +5 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +5 -0
- package/dist/translations/es.d.ts +8 -0
- package/dist/translations/es.js +5 -0
- package/dist/translations/et.d.ts +8 -0
- package/dist/translations/et.js +5 -0
- package/dist/translations/fa.d.ts +8 -0
- package/dist/translations/fa.js +5 -0
- package/dist/translations/fi.d.ts +8 -0
- package/dist/translations/fi.js +5 -0
- package/dist/translations/fr.d.ts +8 -0
- package/dist/translations/fr.js +5 -0
- package/dist/translations/gl.d.ts +8 -0
- package/dist/translations/gl.js +5 -0
- package/dist/translations/he.d.ts +8 -0
- package/dist/translations/he.js +5 -0
- package/dist/translations/hi.d.ts +8 -0
- package/dist/translations/hi.js +5 -0
- package/dist/translations/hr.d.ts +8 -0
- package/dist/translations/hr.js +5 -0
- package/dist/translations/hu.d.ts +8 -0
- package/dist/translations/hu.js +5 -0
- package/dist/translations/hy.d.ts +8 -0
- package/dist/translations/hy.js +5 -0
- package/dist/translations/id.d.ts +8 -0
- package/dist/translations/id.js +5 -0
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.js +5 -0
- package/dist/translations/ja.d.ts +8 -0
- package/dist/translations/ja.js +5 -0
- package/dist/translations/ko.d.ts +8 -0
- package/dist/translations/ko.js +5 -0
- package/dist/translations/ku.d.ts +8 -0
- package/dist/translations/ku.js +5 -0
- package/dist/translations/lt.d.ts +8 -0
- package/dist/translations/lt.js +5 -0
- package/dist/translations/lv.d.ts +8 -0
- package/dist/translations/lv.js +5 -0
- package/dist/translations/ms.d.ts +8 -0
- package/dist/translations/ms.js +5 -0
- package/dist/translations/nb.d.ts +8 -0
- package/dist/translations/nb.js +5 -0
- package/dist/translations/ne.d.ts +8 -0
- package/dist/translations/ne.js +5 -0
- package/dist/translations/nl.d.ts +8 -0
- package/dist/translations/nl.js +5 -0
- package/dist/translations/no.d.ts +8 -0
- package/dist/translations/no.js +5 -0
- package/dist/translations/pl.d.ts +8 -0
- package/dist/translations/pl.js +5 -0
- package/dist/translations/pt-br.d.ts +8 -0
- package/dist/translations/pt-br.js +5 -0
- package/dist/translations/pt.d.ts +8 -0
- package/dist/translations/pt.js +5 -0
- package/dist/translations/ro.d.ts +8 -0
- package/dist/translations/ro.js +5 -0
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.js +5 -0
- package/dist/translations/sk.d.ts +8 -0
- package/dist/translations/sk.js +5 -0
- package/dist/translations/sl.d.ts +8 -0
- package/dist/translations/sl.js +5 -0
- package/dist/translations/sq.d.ts +8 -0
- package/dist/translations/sq.js +5 -0
- package/dist/translations/sr-latn.d.ts +8 -0
- package/dist/translations/sr-latn.js +5 -0
- package/dist/translations/sr.d.ts +8 -0
- package/dist/translations/sr.js +5 -0
- package/dist/translations/sv.d.ts +8 -0
- package/dist/translations/sv.js +5 -0
- package/dist/translations/th.d.ts +8 -0
- package/dist/translations/th.js +5 -0
- package/dist/translations/tk.d.ts +8 -0
- package/dist/translations/tk.js +5 -0
- package/dist/translations/tr.d.ts +8 -0
- package/dist/translations/tr.js +5 -0
- package/dist/translations/tt.d.ts +8 -0
- package/dist/translations/tt.js +5 -0
- package/dist/translations/ug.d.ts +8 -0
- package/dist/translations/ug.js +5 -0
- package/dist/translations/uk.d.ts +8 -0
- package/dist/translations/uk.js +5 -0
- package/dist/translations/ur.d.ts +8 -0
- package/dist/translations/ur.js +5 -0
- package/dist/translations/uz.d.ts +8 -0
- package/dist/translations/uz.js +5 -0
- package/dist/translations/vi.d.ts +8 -0
- package/dist/translations/vi.js +5 -0
- package/dist/translations/zh-cn.d.ts +8 -0
- package/dist/translations/zh-cn.js +5 -0
- package/dist/translations/zh.d.ts +8 -0
- package/dist/translations/zh.js +5 -0
- package/dist/types/augmentation.d.ts +80 -0
- package/dist/types/commands/insertcolumncommand.d.ts +59 -0
- package/dist/types/commands/insertrowcommand.d.ts +58 -0
- package/dist/types/commands/inserttablecommand.d.ts +48 -0
- package/dist/types/commands/mergecellcommand.d.ts +72 -0
- package/dist/types/commands/mergecellscommand.d.ts +32 -0
- package/dist/types/commands/removecolumncommand.d.ts +33 -0
- package/dist/types/commands/removerowcommand.d.ts +33 -0
- package/dist/types/commands/selectcolumncommand.d.ts +37 -0
- package/dist/types/commands/selectrowcommand.d.ts +37 -0
- package/dist/types/commands/setheadercolumncommand.d.ts +54 -0
- package/dist/types/commands/setheaderrowcommand.d.ts +57 -0
- package/dist/types/commands/splitcellcommand.d.ts +47 -0
- package/dist/types/converters/downcast.d.ts +67 -0
- package/dist/types/converters/table-caption-post-fixer.d.ts +24 -0
- package/dist/types/converters/table-cell-paragraph-post-fixer.d.ts +36 -0
- package/dist/types/converters/table-cell-refresh-handler.d.ts +22 -0
- package/dist/types/converters/table-headings-refresh-handler.d.ts +21 -0
- package/dist/types/converters/table-layout-post-fixer.d.ts +230 -0
- package/dist/types/converters/tableproperties.d.ts +58 -0
- package/dist/types/converters/upcasttable.d.ts +53 -0
- package/dist/types/index.d.ts +64 -0
- package/dist/types/plaintableoutput.d.ts +30 -0
- package/dist/types/table.d.ts +44 -0
- package/dist/types/tablecaption/tablecaptionediting.d.ts +67 -0
- package/dist/types/tablecaption/tablecaptionui.d.ts +25 -0
- package/dist/types/tablecaption/toggletablecaptioncommand.d.ts +72 -0
- package/dist/types/tablecaption/utils.d.ts +42 -0
- package/dist/types/tablecaption.d.ts +28 -0
- package/dist/types/tablecellproperties/commands/tablecellbackgroundcolorcommand.d.ts +36 -0
- package/dist/types/tablecellproperties/commands/tablecellbordercolorcommand.d.ts +41 -0
- package/dist/types/tablecellproperties/commands/tablecellborderstylecommand.d.ts +41 -0
- package/dist/types/tablecellproperties/commands/tablecellborderwidthcommand.d.ts +55 -0
- package/dist/types/tablecellproperties/commands/tablecellheightcommand.d.ts +50 -0
- package/dist/types/tablecellproperties/commands/tablecellhorizontalalignmentcommand.d.ts +36 -0
- package/dist/types/tablecellproperties/commands/tablecellpaddingcommand.d.ts +55 -0
- package/dist/types/tablecellproperties/commands/tablecellpropertycommand.d.ts +66 -0
- package/dist/types/tablecellproperties/commands/tablecellverticalalignmentcommand.d.ts +44 -0
- package/dist/types/tablecellproperties/tablecellpropertiesediting.d.ts +47 -0
- package/dist/types/tablecellproperties/tablecellpropertiesui.d.ts +116 -0
- package/dist/types/tablecellproperties/ui/tablecellpropertiesview.d.ts +232 -0
- package/dist/types/tablecellproperties.d.ts +34 -0
- package/dist/types/tablecellwidth/commands/tablecellwidthcommand.d.ts +50 -0
- package/dist/types/tablecellwidth/tablecellwidthediting.d.ts +33 -0
- package/dist/types/tableclipboard.d.ts +74 -0
- package/dist/types/tablecolumnresize/constants.d.ts +24 -0
- package/dist/types/tablecolumnresize/converters.d.ts +22 -0
- package/dist/types/tablecolumnresize/tablecolumnresizeediting.d.ts +143 -0
- package/dist/types/tablecolumnresize/tablewidthscommand.d.ts +42 -0
- package/dist/types/tablecolumnresize/utils.d.ts +152 -0
- package/dist/types/tablecolumnresize.d.ts +30 -0
- package/dist/types/tableconfig.d.ts +347 -0
- package/dist/types/tableediting.d.ts +102 -0
- package/dist/types/tablekeyboard.d.ts +72 -0
- package/dist/types/tablemouse/mouseeventsobserver.d.ts +66 -0
- package/dist/types/tablemouse.d.ts +52 -0
- package/dist/types/tableproperties/commands/tablealignmentcommand.d.ts +36 -0
- package/dist/types/tableproperties/commands/tablebackgroundcolorcommand.d.ts +36 -0
- package/dist/types/tableproperties/commands/tablebordercolorcommand.d.ts +41 -0
- package/dist/types/tableproperties/commands/tableborderstylecommand.d.ts +41 -0
- package/dist/types/tableproperties/commands/tableborderwidthcommand.d.ts +55 -0
- package/dist/types/tableproperties/commands/tableheightcommand.d.ts +50 -0
- package/dist/types/tableproperties/commands/tablepropertycommand.d.ts +65 -0
- package/dist/types/tableproperties/commands/tablewidthcommand.d.ts +50 -0
- package/dist/types/tableproperties/tablepropertiesediting.d.ts +44 -0
- package/dist/types/tableproperties/tablepropertiesui.d.ts +118 -0
- package/dist/types/tableproperties/ui/tablepropertiesview.d.ts +211 -0
- package/dist/types/tableproperties.d.ts +34 -0
- package/dist/types/tableselection.d.ts +111 -0
- package/dist/types/tabletoolbar.d.ts +36 -0
- package/dist/types/tableui.d.ts +58 -0
- package/dist/types/tableutils.d.ts +452 -0
- package/dist/types/tablewalker.d.ts +366 -0
- package/dist/types/ui/colorinputview.d.ts +144 -0
- package/dist/types/ui/formrowview.d.ts +65 -0
- package/dist/types/ui/inserttableview.d.ts +85 -0
- package/dist/types/utils/common.d.ts +50 -0
- package/dist/types/utils/structure.d.ts +249 -0
- package/dist/types/utils/table-properties.d.ts +71 -0
- package/dist/types/utils/ui/contextualballoon.d.ts +38 -0
- package/dist/types/utils/ui/table-properties.d.ts +199 -0
- package/dist/types/utils/ui/widget.d.ts +24 -0
- package/package.json +3 -2
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module table/tablecaption/utils
|
|
11
|
+
*/
|
|
12
|
+
import type { DocumentFragment, DocumentSelection, Element, ViewElement } from 'ckeditor5/src/engine.js';
|
|
13
|
+
/**
|
|
14
|
+
* Checks if the provided model element is a `table`.
|
|
15
|
+
*
|
|
16
|
+
* @param modelElement Element to check if it is a table.
|
|
17
|
+
*/
|
|
18
|
+
export declare function isTable(modelElement: Element | DocumentFragment | null): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Returns the caption model element from a given table element. Returns `null` if no caption is found.
|
|
21
|
+
*
|
|
22
|
+
* @param tableModelElement Table element in which we will try to find a caption element.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getCaptionFromTableModelElement(tableModelElement: Element): Element | null;
|
|
25
|
+
/**
|
|
26
|
+
* Returns the caption model element for a model selection. Returns `null` if the selection has no caption element ancestor.
|
|
27
|
+
*
|
|
28
|
+
* @param selection The selection checked for caption presence.
|
|
29
|
+
*/
|
|
30
|
+
export declare function getCaptionFromModelSelection(selection: DocumentSelection): Element | null;
|
|
31
|
+
/**
|
|
32
|
+
* {@link module:engine/view/matcher~Matcher} pattern. Checks if a given element is a caption.
|
|
33
|
+
*
|
|
34
|
+
* There are two possible forms of the valid caption:
|
|
35
|
+
* - A `<figcaption>` element inside a `<figure class="table">` element.
|
|
36
|
+
* - A `<caption>` inside a <table>.
|
|
37
|
+
*
|
|
38
|
+
* @returns Returns the object accepted by {@link module:engine/view/matcher~Matcher} or `null` if the element cannot be matched.
|
|
39
|
+
*/
|
|
40
|
+
export declare function matchTableCaptionViewElement(element: ViewElement): {
|
|
41
|
+
name: true;
|
|
42
|
+
} | null;
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module table/tablecaption
|
|
11
|
+
*/
|
|
12
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
+
import TableCaptionEditing from './tablecaption/tablecaptionediting.js';
|
|
14
|
+
import TableCaptionUI from './tablecaption/tablecaptionui.js';
|
|
15
|
+
import '../theme/tablecaption.css';
|
|
16
|
+
/**
|
|
17
|
+
* The table caption plugin.
|
|
18
|
+
*/
|
|
19
|
+
export default class TableCaption extends Plugin {
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
static get pluginName(): "TableCaption";
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
static get requires(): readonly [typeof TableCaptionEditing, typeof TableCaptionUI];
|
|
28
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module table/tablecellproperties/commands/tablecellbackgroundcolorcommand
|
|
11
|
+
*/
|
|
12
|
+
import type { Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
import TableCellPropertyCommand from './tablecellpropertycommand.js';
|
|
14
|
+
/**
|
|
15
|
+
* The table cell background color command.
|
|
16
|
+
*
|
|
17
|
+
* The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
|
|
18
|
+
* the `'tableCellBackgroundColor'` editor command.
|
|
19
|
+
*
|
|
20
|
+
* To change the background color of selected cells, execute the command:
|
|
21
|
+
*
|
|
22
|
+
* ```ts
|
|
23
|
+
* editor.execute( 'tableCellBackgroundColor', {
|
|
24
|
+
* value: '#f00'
|
|
25
|
+
* } );
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export default class TableCellBackgroundColorCommand extends TableCellPropertyCommand {
|
|
29
|
+
/**
|
|
30
|
+
* Creates a new `TableCellBackgroundColorCommand` instance.
|
|
31
|
+
*
|
|
32
|
+
* @param editor An editor in which this command will be used.
|
|
33
|
+
* @param defaultValue The default value of the attribute.
|
|
34
|
+
*/
|
|
35
|
+
constructor(editor: Editor, defaultValue: string);
|
|
36
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module table/tablecellproperties/commands/tablecellbordercolorcommand
|
|
11
|
+
*/
|
|
12
|
+
import type { Element } from 'ckeditor5/src/engine.js';
|
|
13
|
+
import type { Editor } from 'ckeditor5/src/core.js';
|
|
14
|
+
import TableCellPropertyCommand from './tablecellpropertycommand.js';
|
|
15
|
+
/**
|
|
16
|
+
* The table cell border color command.
|
|
17
|
+
*
|
|
18
|
+
* The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
|
|
19
|
+
* the `'tableCellBorderColor'` editor command.
|
|
20
|
+
*
|
|
21
|
+
* To change the border color of selected cells, execute the command:
|
|
22
|
+
*
|
|
23
|
+
* ```ts
|
|
24
|
+
* editor.execute( 'tableCellBorderColor', {
|
|
25
|
+
* value: '#f00'
|
|
26
|
+
* } );
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export default class TableCellBorderColorCommand extends TableCellPropertyCommand {
|
|
30
|
+
/**
|
|
31
|
+
* Creates a new `TableCellBorderColorCommand` instance.
|
|
32
|
+
*
|
|
33
|
+
* @param editor An editor in which this command will be used.
|
|
34
|
+
* @param defaultValue The default value of the attribute.
|
|
35
|
+
*/
|
|
36
|
+
constructor(editor: Editor, defaultValue: string);
|
|
37
|
+
/**
|
|
38
|
+
* @inheritDoc
|
|
39
|
+
*/
|
|
40
|
+
protected _getAttribute(tableCell: Element): unknown;
|
|
41
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module table/tablecellproperties/commands/tablecellborderstylecommand
|
|
11
|
+
*/
|
|
12
|
+
import type { Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
import type { Element } from 'ckeditor5/src/engine.js';
|
|
14
|
+
import TableCellPropertyCommand from './tablecellpropertycommand.js';
|
|
15
|
+
/**
|
|
16
|
+
* The table cell border style command.
|
|
17
|
+
*
|
|
18
|
+
* The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
|
|
19
|
+
* the `'tableCellBorderStyle'` editor command.
|
|
20
|
+
*
|
|
21
|
+
* To change the border style of selected cells, execute the command:
|
|
22
|
+
*
|
|
23
|
+
* ```ts
|
|
24
|
+
* editor.execute( 'tableCellBorderStyle', {
|
|
25
|
+
* value: 'dashed'
|
|
26
|
+
* } );
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export default class TableCellBorderStyleCommand extends TableCellPropertyCommand {
|
|
30
|
+
/**
|
|
31
|
+
* Creates a new `TableCellBorderStyleCommand` instance.
|
|
32
|
+
*
|
|
33
|
+
* @param editor An editor in which this command will be used.
|
|
34
|
+
* @param defaultValue The default value of the attribute.
|
|
35
|
+
*/
|
|
36
|
+
constructor(editor: Editor, defaultValue: string);
|
|
37
|
+
/**
|
|
38
|
+
* @inheritDoc
|
|
39
|
+
*/
|
|
40
|
+
protected _getAttribute(tableCell: Element): unknown;
|
|
41
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module table/tablecellproperties/commands/tablecellborderwidthcommand
|
|
11
|
+
*/
|
|
12
|
+
import type { Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
import type { Element } from 'ckeditor5/src/engine.js';
|
|
14
|
+
import TableCellPropertyCommand from './tablecellpropertycommand.js';
|
|
15
|
+
/**
|
|
16
|
+
* The table cell border width command.
|
|
17
|
+
*
|
|
18
|
+
* The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
|
|
19
|
+
* the `'tableCellBorderWidth'` editor command.
|
|
20
|
+
*
|
|
21
|
+
* To change the border width of selected cells, execute the command:
|
|
22
|
+
*
|
|
23
|
+
* ```ts
|
|
24
|
+
* editor.execute( 'tableCellBorderWidth', {
|
|
25
|
+
* value: '5px'
|
|
26
|
+
* } );
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* **Note**: This command adds the default `'px'` unit to numeric values. Executing:
|
|
30
|
+
*
|
|
31
|
+
* ```ts
|
|
32
|
+
* editor.execute( 'tableCellBorderWidth', {
|
|
33
|
+
* value: '5'
|
|
34
|
+
* } );
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* will set the `borderWidth` attribute to `'5px'` in the model.
|
|
38
|
+
*/
|
|
39
|
+
export default class TableCellBorderWidthCommand extends TableCellPropertyCommand {
|
|
40
|
+
/**
|
|
41
|
+
* Creates a new `TableCellBorderWidthCommand` instance.
|
|
42
|
+
*
|
|
43
|
+
* @param editor An editor in which this command will be used.
|
|
44
|
+
* @param defaultValue The default value of the attribute.
|
|
45
|
+
*/
|
|
46
|
+
constructor(editor: Editor, defaultValue: string);
|
|
47
|
+
/**
|
|
48
|
+
* @inheritDoc
|
|
49
|
+
*/
|
|
50
|
+
protected _getAttribute(tableCell: Element): unknown;
|
|
51
|
+
/**
|
|
52
|
+
* @inheritDoc
|
|
53
|
+
*/
|
|
54
|
+
protected _getValueToSet(value: string | number | undefined): unknown;
|
|
55
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module table/tablecellproperties/commands/tablecellheightcommand
|
|
11
|
+
*/
|
|
12
|
+
import type { Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
import TableCellPropertyCommand from './tablecellpropertycommand.js';
|
|
14
|
+
/**
|
|
15
|
+
* The table cell height command.
|
|
16
|
+
*
|
|
17
|
+
* The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
|
|
18
|
+
* the `'tableCellHeight'` editor command.
|
|
19
|
+
*
|
|
20
|
+
* To change the height of selected cells, execute the command:
|
|
21
|
+
*
|
|
22
|
+
* ```ts
|
|
23
|
+
* editor.execute( 'tableCellHeight', {
|
|
24
|
+
* value: '50px'
|
|
25
|
+
* } );
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* **Note**: This command adds the default `'px'` unit to numeric values. Executing:
|
|
29
|
+
*
|
|
30
|
+
* ```ts
|
|
31
|
+
* editor.execute( 'tableCellHeight', {
|
|
32
|
+
* value: '50'
|
|
33
|
+
* } );
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* will set the `height` attribute to `'50px'` in the model.
|
|
37
|
+
*/
|
|
38
|
+
export default class TableCellHeightCommand extends TableCellPropertyCommand {
|
|
39
|
+
/**
|
|
40
|
+
* Creates a new `TableCellHeightCommand` instance.
|
|
41
|
+
*
|
|
42
|
+
* @param editor An editor in which this command will be used.
|
|
43
|
+
* @param defaultValue The default value of the attribute.
|
|
44
|
+
*/
|
|
45
|
+
constructor(editor: Editor, defaultValue: string);
|
|
46
|
+
/**
|
|
47
|
+
* @inheritDoc
|
|
48
|
+
*/
|
|
49
|
+
protected _getValueToSet(value: string | number | undefined): unknown;
|
|
50
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module table/tablecellproperties/commands/tablecellhorizontalalignmentcommand
|
|
11
|
+
*/
|
|
12
|
+
import type { Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
import TableCellPropertyCommand from './tablecellpropertycommand.js';
|
|
14
|
+
/**
|
|
15
|
+
* The table cell horizontal alignment command.
|
|
16
|
+
*
|
|
17
|
+
* The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
|
|
18
|
+
* the `'tableCellHorizontalAlignment'` editor command.
|
|
19
|
+
*
|
|
20
|
+
* To change the horizontal text alignment of selected cells, execute the command:
|
|
21
|
+
*
|
|
22
|
+
* ```ts
|
|
23
|
+
* editor.execute( 'tableCellHorizontalAlignment', {
|
|
24
|
+
* value: 'right'
|
|
25
|
+
* } );
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export default class TableCellHorizontalAlignmentCommand extends TableCellPropertyCommand {
|
|
29
|
+
/**
|
|
30
|
+
* Creates a new `TableCellHorizontalAlignmentCommand` instance.
|
|
31
|
+
*
|
|
32
|
+
* @param editor An editor in which this command will be used.
|
|
33
|
+
* @param defaultValue The default value for the "alignment" attribute.
|
|
34
|
+
*/
|
|
35
|
+
constructor(editor: Editor, defaultValue: string);
|
|
36
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module table/tablecellproperties/commands/tablecellpaddingcommand
|
|
11
|
+
*/
|
|
12
|
+
import type { Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
import type { Element } from 'ckeditor5/src/engine.js';
|
|
14
|
+
import TableCellPropertyCommand from './tablecellpropertycommand.js';
|
|
15
|
+
/**
|
|
16
|
+
* The table cell padding command.
|
|
17
|
+
*
|
|
18
|
+
* The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
|
|
19
|
+
* the `'tableCellPadding'` editor command.
|
|
20
|
+
*
|
|
21
|
+
* To change the padding of selected cells, execute the command:
|
|
22
|
+
*
|
|
23
|
+
* ```ts
|
|
24
|
+
* editor.execute( 'tableCellPadding', {
|
|
25
|
+
* value: '5px'
|
|
26
|
+
* } );
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* **Note**: This command adds the default `'px'` unit to numeric values. Executing:
|
|
30
|
+
*
|
|
31
|
+
* ```ts
|
|
32
|
+
* editor.execute( 'tableCellPadding', {
|
|
33
|
+
* value: '5'
|
|
34
|
+
* } );
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* will set the `padding` attribute to `'5px'` in the model.
|
|
38
|
+
*/
|
|
39
|
+
export default class TableCellPaddingCommand extends TableCellPropertyCommand {
|
|
40
|
+
/**
|
|
41
|
+
* Creates a new `TableCellPaddingCommand` instance.
|
|
42
|
+
*
|
|
43
|
+
* @param editor An editor in which this command will be used.
|
|
44
|
+
* @param defaultValue The default value of the attribute.
|
|
45
|
+
*/
|
|
46
|
+
constructor(editor: Editor, defaultValue: string);
|
|
47
|
+
/**
|
|
48
|
+
* @inheritDoc
|
|
49
|
+
*/
|
|
50
|
+
protected _getAttribute(tableCell: Element): unknown;
|
|
51
|
+
/**
|
|
52
|
+
* @inheritDoc
|
|
53
|
+
*/
|
|
54
|
+
protected _getValueToSet(value: string | number | undefined): unknown;
|
|
55
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module table/tablecellproperties/commands/tablecellpropertycommand
|
|
11
|
+
*/
|
|
12
|
+
import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
import type { Element, Batch } from 'ckeditor5/src/engine.js';
|
|
14
|
+
/**
|
|
15
|
+
* The table cell attribute command.
|
|
16
|
+
*
|
|
17
|
+
* The command is a base command for other table cell property commands.
|
|
18
|
+
*/
|
|
19
|
+
export default class TableCellPropertyCommand extends Command {
|
|
20
|
+
/**
|
|
21
|
+
* The attribute that will be set by the command.
|
|
22
|
+
*/
|
|
23
|
+
readonly attributeName: string;
|
|
24
|
+
/**
|
|
25
|
+
* The default value for the attribute.
|
|
26
|
+
*/
|
|
27
|
+
protected readonly _defaultValue: string;
|
|
28
|
+
/**
|
|
29
|
+
* Creates a new `TableCellPropertyCommand` instance.
|
|
30
|
+
*
|
|
31
|
+
* @param editor An editor in which this command will be used.
|
|
32
|
+
* @param attributeName Table cell attribute name.
|
|
33
|
+
* @param defaultValue The default value of the attribute.
|
|
34
|
+
*/
|
|
35
|
+
constructor(editor: Editor, attributeName: string, defaultValue: string);
|
|
36
|
+
/**
|
|
37
|
+
* @inheritDoc
|
|
38
|
+
*/
|
|
39
|
+
refresh(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Executes the command.
|
|
42
|
+
*
|
|
43
|
+
* @fires execute
|
|
44
|
+
* @param options.value If set, the command will set the attribute on selected table cells.
|
|
45
|
+
* If it is not set, the command will remove the attribute from the selected table cells.
|
|
46
|
+
* @param options.batch Pass the model batch instance to the command to aggregate changes,
|
|
47
|
+
* for example to allow a single undo step for multiple executions.
|
|
48
|
+
*/
|
|
49
|
+
execute(options?: {
|
|
50
|
+
value?: string | number;
|
|
51
|
+
batch?: Batch;
|
|
52
|
+
}): void;
|
|
53
|
+
/**
|
|
54
|
+
* Returns the attribute value for a table cell.
|
|
55
|
+
*/
|
|
56
|
+
protected _getAttribute(tableCell: Element | undefined): unknown;
|
|
57
|
+
/**
|
|
58
|
+
* Returns the proper model value. It can be used to add a default unit to numeric values.
|
|
59
|
+
*/
|
|
60
|
+
protected _getValueToSet(value: string | number | undefined): unknown;
|
|
61
|
+
/**
|
|
62
|
+
* Returns a single value for all selected table cells. If the value is the same for all cells,
|
|
63
|
+
* it will be returned (`undefined` otherwise).
|
|
64
|
+
*/
|
|
65
|
+
private _getSingleValue;
|
|
66
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module table/tablecellproperties/commands/tablecellverticalalignmentcommand
|
|
11
|
+
*/
|
|
12
|
+
import type { Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
import TableCellPropertyCommand from './tablecellpropertycommand.js';
|
|
14
|
+
/**
|
|
15
|
+
* The table cell vertical alignment command.
|
|
16
|
+
*
|
|
17
|
+
* The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
|
|
18
|
+
* the `'tableCellVerticalAlignment'` editor command.
|
|
19
|
+
*
|
|
20
|
+
* To change the vertical text alignment of selected cells, execute the command:
|
|
21
|
+
*
|
|
22
|
+
* ```ts
|
|
23
|
+
* editor.execute( 'tableCellVerticalAlignment', {
|
|
24
|
+
* value: 'top'
|
|
25
|
+
* } );
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* The following values, corresponding to the
|
|
29
|
+
* [`vertical-align` CSS attribute](https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align), are allowed:
|
|
30
|
+
*
|
|
31
|
+
* * `'top'`
|
|
32
|
+
* * `'bottom'`
|
|
33
|
+
*
|
|
34
|
+
* The `'middle'` value is the default one so there is no need to set it.
|
|
35
|
+
*/
|
|
36
|
+
export default class TableCellVerticalAlignmentCommand extends TableCellPropertyCommand {
|
|
37
|
+
/**
|
|
38
|
+
* Creates a new `TableCellVerticalAlignmentCommand` instance.
|
|
39
|
+
*
|
|
40
|
+
* @param editor An editor in which this command will be used.
|
|
41
|
+
* @param defaultValue The default value for the "alignment" attribute.
|
|
42
|
+
*/
|
|
43
|
+
constructor(editor: Editor, defaultValue: string);
|
|
44
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module table/tablecellproperties/tablecellpropertiesediting
|
|
11
|
+
*/
|
|
12
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
+
import TableEditing from './../tableediting.js';
|
|
14
|
+
import TableCellWidthEditing from '../tablecellwidth/tablecellwidthediting.js';
|
|
15
|
+
/**
|
|
16
|
+
* The table cell properties editing feature.
|
|
17
|
+
*
|
|
18
|
+
* Introduces table cell model attributes and their conversion:
|
|
19
|
+
*
|
|
20
|
+
* - border: `tableCellBorderStyle`, `tableCellBorderColor` and `tableCellBorderWidth`
|
|
21
|
+
* - background color: `tableCellBackgroundColor`
|
|
22
|
+
* - cell padding: `tableCellPadding`
|
|
23
|
+
* - horizontal and vertical alignment: `tableCellHorizontalAlignment`, `tableCellVerticalAlignment`
|
|
24
|
+
* - cell width and height: `tableCellWidth`, `tableCellHeight`
|
|
25
|
+
*
|
|
26
|
+
* It also registers commands used to manipulate the above attributes:
|
|
27
|
+
*
|
|
28
|
+
* - border: the `'tableCellBorderStyle'`, `'tableCellBorderColor'` and `'tableCellBorderWidth'` commands
|
|
29
|
+
* - background color: the `'tableCellBackgroundColor'` command
|
|
30
|
+
* - cell padding: the `'tableCellPadding'` command
|
|
31
|
+
* - horizontal and vertical alignment: the `'tableCellHorizontalAlignment'` and `'tableCellVerticalAlignment'` commands
|
|
32
|
+
* - width and height: the `'tableCellWidth'` and `'tableCellHeight'` commands
|
|
33
|
+
*/
|
|
34
|
+
export default class TableCellPropertiesEditing extends Plugin {
|
|
35
|
+
/**
|
|
36
|
+
* @inheritDoc
|
|
37
|
+
*/
|
|
38
|
+
static get pluginName(): "TableCellPropertiesEditing";
|
|
39
|
+
/**
|
|
40
|
+
* @inheritDoc
|
|
41
|
+
*/
|
|
42
|
+
static get requires(): readonly [typeof TableEditing, typeof TableCellWidthEditing];
|
|
43
|
+
/**
|
|
44
|
+
* @inheritDoc
|
|
45
|
+
*/
|
|
46
|
+
init(): void;
|
|
47
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module table/tablecellproperties/tablecellpropertiesui
|
|
11
|
+
*/
|
|
12
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
import { ContextualBalloon } from 'ckeditor5/src/ui.js';
|
|
14
|
+
import TableCellPropertiesView from './ui/tablecellpropertiesview.js';
|
|
15
|
+
/**
|
|
16
|
+
* The table cell properties UI plugin. It introduces the `'tableCellProperties'` button
|
|
17
|
+
* that opens a form allowing to specify the visual styling of a table cell.
|
|
18
|
+
*
|
|
19
|
+
* It uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon plugin}.
|
|
20
|
+
*/
|
|
21
|
+
export default class TableCellPropertiesUI extends Plugin {
|
|
22
|
+
/**
|
|
23
|
+
* The default table cell properties.
|
|
24
|
+
*/
|
|
25
|
+
private _defaultTableCellProperties;
|
|
26
|
+
/**
|
|
27
|
+
* The contextual balloon plugin instance.
|
|
28
|
+
*/
|
|
29
|
+
private _balloon?;
|
|
30
|
+
/**
|
|
31
|
+
* The cell properties form view displayed inside the balloon.
|
|
32
|
+
*/
|
|
33
|
+
view?: TableCellPropertiesView | null;
|
|
34
|
+
/**
|
|
35
|
+
* The batch used to undo all changes made by the form (which are live, as the user types)
|
|
36
|
+
* when "Cancel" was pressed. Each time the view is shown, a new batch is created.
|
|
37
|
+
*/
|
|
38
|
+
private _undoStepBatch?;
|
|
39
|
+
/**
|
|
40
|
+
* Flag used to indicate whether view is ready to execute update commands
|
|
41
|
+
* (it finished loading initial data).
|
|
42
|
+
*/
|
|
43
|
+
private _isReady?;
|
|
44
|
+
/**
|
|
45
|
+
* @inheritDoc
|
|
46
|
+
*/
|
|
47
|
+
static get requires(): readonly [typeof ContextualBalloon];
|
|
48
|
+
/**
|
|
49
|
+
* @inheritDoc
|
|
50
|
+
*/
|
|
51
|
+
static get pluginName(): "TableCellPropertiesUI";
|
|
52
|
+
/**
|
|
53
|
+
* @inheritDoc
|
|
54
|
+
*/
|
|
55
|
+
constructor(editor: Editor);
|
|
56
|
+
/**
|
|
57
|
+
* @inheritDoc
|
|
58
|
+
*/
|
|
59
|
+
init(): void;
|
|
60
|
+
/**
|
|
61
|
+
* @inheritDoc
|
|
62
|
+
*/
|
|
63
|
+
destroy(): void;
|
|
64
|
+
/**
|
|
65
|
+
* Creates the {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView} instance.
|
|
66
|
+
*
|
|
67
|
+
* @returns The cell properties form view instance.
|
|
68
|
+
*/
|
|
69
|
+
private _createPropertiesView;
|
|
70
|
+
/**
|
|
71
|
+
* In this method the "editor data -> UI" binding is happening.
|
|
72
|
+
*
|
|
73
|
+
* When executed, this method obtains selected cell property values from various table commands
|
|
74
|
+
* and passes them to the {@link #view}.
|
|
75
|
+
*
|
|
76
|
+
* This way, the UI stays up–to–date with the editor data.
|
|
77
|
+
*/
|
|
78
|
+
private _fillViewFormFromCommandValues;
|
|
79
|
+
/**
|
|
80
|
+
* Shows the {@link #view} in the {@link #_balloon}.
|
|
81
|
+
*
|
|
82
|
+
* **Note**: Each time a view is shown, a new {@link #_undoStepBatch} is created. It contains
|
|
83
|
+
* all changes made to the document when the view is visible, allowing a single undo step
|
|
84
|
+
* for all of them.
|
|
85
|
+
*/
|
|
86
|
+
protected _showView(): void;
|
|
87
|
+
/**
|
|
88
|
+
* Removes the {@link #view} from the {@link #_balloon}.
|
|
89
|
+
*/
|
|
90
|
+
protected _hideView(): void;
|
|
91
|
+
/**
|
|
92
|
+
* Repositions the {@link #_balloon} or hides the {@link #view} if a table cell is no longer selected.
|
|
93
|
+
*/
|
|
94
|
+
protected _updateView(): void;
|
|
95
|
+
/**
|
|
96
|
+
* Returns `true` when the {@link #view} is visible in the {@link #_balloon}.
|
|
97
|
+
*/
|
|
98
|
+
private get _isViewVisible();
|
|
99
|
+
/**
|
|
100
|
+
* Returns `true` when the {@link #view} is in the {@link #_balloon}.
|
|
101
|
+
*/
|
|
102
|
+
private get _isViewInBalloon();
|
|
103
|
+
/**
|
|
104
|
+
* Creates a callback that when executed upon the {@link #view view's} property change
|
|
105
|
+
* executes a related editor command with the new property value.
|
|
106
|
+
*
|
|
107
|
+
* @param defaultValue The default value of the command.
|
|
108
|
+
*/
|
|
109
|
+
private _getPropertyChangeCallback;
|
|
110
|
+
/**
|
|
111
|
+
* Creates a callback that when executed upon the {@link #view view's} property change:
|
|
112
|
+
* * Executes a related editor command with the new property value if the value is valid,
|
|
113
|
+
* * Or sets the error text next to the invalid field, if the value did not pass the validation.
|
|
114
|
+
*/
|
|
115
|
+
private _getValidatedPropertyChangeCallback;
|
|
116
|
+
}
|