@ckeditor/ckeditor5-table 45.0.0 → 45.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-table",
3
- "version": "45.0.0",
3
+ "version": "45.1.0-alpha.0",
4
4
  "description": "Table feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -13,14 +13,14 @@
13
13
  "type": "module",
14
14
  "main": "src/index.js",
15
15
  "dependencies": {
16
- "ckeditor5": "45.0.0",
17
- "@ckeditor/ckeditor5-clipboard": "45.0.0",
18
- "@ckeditor/ckeditor5-core": "45.0.0",
19
- "@ckeditor/ckeditor5-engine": "45.0.0",
20
- "@ckeditor/ckeditor5-icons": "45.0.0",
21
- "@ckeditor/ckeditor5-ui": "45.0.0",
22
- "@ckeditor/ckeditor5-utils": "45.0.0",
23
- "@ckeditor/ckeditor5-widget": "45.0.0",
16
+ "ckeditor5": "45.1.0-alpha.0",
17
+ "@ckeditor/ckeditor5-clipboard": "45.1.0-alpha.0",
18
+ "@ckeditor/ckeditor5-core": "45.1.0-alpha.0",
19
+ "@ckeditor/ckeditor5-engine": "45.1.0-alpha.0",
20
+ "@ckeditor/ckeditor5-icons": "45.1.0-alpha.0",
21
+ "@ckeditor/ckeditor5-ui": "45.1.0-alpha.0",
22
+ "@ckeditor/ckeditor5-utils": "45.1.0-alpha.0",
23
+ "@ckeditor/ckeditor5-widget": "45.1.0-alpha.0",
24
24
  "es-toolkit": "1.32.0"
25
25
  },
26
26
  "author": "CKSource (http://cksource.com/)",
@@ -116,7 +116,7 @@ export default class TableCellPropertiesUI extends Plugin {
116
116
  * Creates a callback that when executed upon the {@link #view view's} property change
117
117
  * executes a related editor command with the new property value.
118
118
  *
119
- * @param defaultValue The default value of the command.
119
+ * @param commandName The default value of the command.
120
120
  */
121
121
  private _getPropertyChangeCallback;
122
122
  /**
@@ -341,7 +341,7 @@ export default class TableCellPropertiesUI extends Plugin {
341
341
  * Creates a callback that when executed upon the {@link #view view's} property change
342
342
  * executes a related editor command with the new property value.
343
343
  *
344
- * @param defaultValue The default value of the command.
344
+ * @param commandName The default value of the command.
345
345
  */
346
346
  _getPropertyChangeCallback(commandName) {
347
347
  return (evt, propertyName, newValue) => {
@@ -261,6 +261,8 @@ export default class TableSelection extends Plugin {
261
261
  const mapper = editor.editing.mapper;
262
262
  const viewRanges = selectedCells.map(tableCell => view.createRangeOn(mapper.toViewElement(tableCell)));
263
263
  data.selection = view.createSelection(viewRanges);
264
+ // Do not let the browser handle it itself. We must modify the model and then apply changes to the view and DOM.
265
+ data.preventDefault();
264
266
  }
265
267
  /**
266
268
  * Returns an array of table cells that should be selected based on the
@@ -67,7 +67,14 @@ export declare function getBorderStyleDefinitions(view: TableCellPropertiesView
67
67
  * * have some icons,
68
68
  * * set a certain UI view property value upon execution.
69
69
  *
70
- * @param nameToValue A function that maps a button name to a value. By default names are the same as values.
70
+ * @param options Configuration options
71
+ * @param options.view The view that has the observable property.
72
+ * @param options.icons Object with button icons.
73
+ * @param options.toolbar The toolbar to fill with buttons.
74
+ * @param options.labels Object with button labels.
75
+ * @param options.propertyName The name of the observable property in the view.
76
+ * @param options.nameToValue A function that maps a button name to a value. By default names are the same as values.
77
+ * @param options.defaultValue Default value for the property.
71
78
  */
72
79
  export declare function fillToolbar<TView extends View, TPropertyName extends keyof TView>(options: {
73
80
  view: TView;
@@ -121,7 +121,14 @@ export function getBorderStyleDefinitions(view, defaultStyle) {
121
121
  * * have some icons,
122
122
  * * set a certain UI view property value upon execution.
123
123
  *
124
- * @param nameToValue A function that maps a button name to a value. By default names are the same as values.
124
+ * @param options Configuration options
125
+ * @param options.view The view that has the observable property.
126
+ * @param options.icons Object with button icons.
127
+ * @param options.toolbar The toolbar to fill with buttons.
128
+ * @param options.labels Object with button labels.
129
+ * @param options.propertyName The name of the observable property in the view.
130
+ * @param options.nameToValue A function that maps a button name to a value. By default names are the same as values.
131
+ * @param options.defaultValue Default value for the property.
125
132
  */
126
133
  export function fillToolbar(options) {
127
134
  const { view, icons, toolbar, labels, propertyName, nameToValue, defaultValue } = options;
package/theme/table.css CHANGED
@@ -23,8 +23,7 @@
23
23
  }
24
24
  }
25
25
 
26
- & figure.table:not(.layout-table),
27
- & table.table:not(.layout-table) {
26
+ & .table:not(.layout-table) {
28
27
  /* Give the table widget some air and center it horizontally */
29
28
  /* The first value should be equal to --ck-spacing-large variable if used in the editor context
30
29
  to avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */