@plone/volto-slate 18.8.0 → 18.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -8,6 +8,12 @@
8
8
 
9
9
  <!-- towncrier release notes start -->
10
10
 
11
+ ## 18.8.1 (2026-03-02)
12
+
13
+ ### Bugfix
14
+
15
+ - Use Slate Table block when pasting tables snippets (instead of deprecated DraftJS) @cekk [#7865](https://github.com/plone/volto/issues/7865)
16
+
11
17
  ## 18.8.0 (2025-12-02)
12
18
 
13
19
  ### Feature
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plone/volto-slate",
3
- "version": "18.8.0",
3
+ "version": "18.8.1",
4
4
  "description": "Slate.js integration with Volto",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -19,7 +19,7 @@ import {
19
19
  export function syncCreateTableBlock(rows) {
20
20
  const id = uuid();
21
21
  const block = {
22
- '@type': 'table',
22
+ '@type': 'slateTable',
23
23
  table: {
24
24
  rows,
25
25
  },
@@ -0,0 +1,24 @@
1
+ import { syncCreateTableBlock } from './deconstruct';
2
+
3
+ describe('syncCreateTableBlock', () => {
4
+ it('creates a slateTable block with the given rows', () => {
5
+ const rows = [
6
+ {
7
+ key: 'row1',
8
+ cells: [
9
+ {
10
+ key: 'cell1',
11
+ type: 'data',
12
+ value: [{ children: [{ text: '1' }] }],
13
+ },
14
+ ],
15
+ },
16
+ ];
17
+
18
+ const [id, block] = syncCreateTableBlock(rows);
19
+
20
+ expect(id).toBeDefined();
21
+ expect(block['@type']).toBe('slateTableaa');
22
+ expect(block.table.rows).toEqual(rows);
23
+ });
24
+ });