@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
|
@@ -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
|
+
});
|