@blocknote/core 0.24.1 → 0.25.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/blocknote.cjs +12 -0
- package/dist/blocknote.cjs.map +1 -0
- package/dist/blocknote.js +5028 -3444
- package/dist/blocknote.js.map +1 -1
- package/dist/comments.cjs +2 -0
- package/dist/comments.cjs.map +1 -0
- package/dist/comments.js +593 -0
- package/dist/comments.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +39 -26
- package/src/api/blockManipulation/commands/insertBlocks/__snapshots__/insertBlocks.test.ts.snap +1022 -378
- package/src/api/blockManipulation/commands/mergeBlocks/__snapshots__/mergeBlocks.test.ts.snap +730 -270
- package/src/api/blockManipulation/commands/moveBlocks/__snapshots__/moveBlocks.test.ts.snap +3100 -1260
- package/src/api/blockManipulation/commands/removeBlocks/__snapshots__/removeBlocks.test.ts.snap +438 -162
- package/src/api/blockManipulation/commands/replaceBlocks/__snapshots__/replaceBlocks.test.ts.snap +1168 -432
- package/src/api/blockManipulation/commands/splitBlock/__snapshots__/splitBlock.test.ts.snap +930 -378
- package/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap +2485 -1015
- package/src/api/blockManipulation/commands/updateBlock/updateBlock.test.ts +28 -1
- package/src/api/blockManipulation/commands/updateBlock/updateBlock.ts +1 -1
- package/src/api/blockManipulation/selections/__snapshots__/selection.test.ts.snap +292 -108
- package/src/api/blockManipulation/setupTestEnv.ts +14 -1
- package/src/api/blockManipulation/tables/tables.test.ts +1987 -0
- package/src/api/blockManipulation/tables/tables.ts +887 -0
- package/src/api/clipboard/__snapshots__/external/pasteEndOfParagraph.html +66 -24
- package/src/api/clipboard/__snapshots__/external/pasteEndOfParagraphText.html +66 -24
- package/src/api/clipboard/__snapshots__/external/pasteImage.html +66 -24
- package/src/api/clipboard/__snapshots__/external/pasteParagraphInCustomBlock.html +66 -24
- package/src/api/clipboard/__snapshots__/external/pasteTable.html +132 -48
- package/src/api/clipboard/__snapshots__/external/pasteTableInExistingTable.html +136 -44
- package/src/api/clipboard/fromClipboard/handleFileInsertion.ts +36 -14
- package/src/api/clipboard/toClipboard/copyExtension.ts +2 -3
- package/src/api/exporters/html/__snapshots__/table/headerCols/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/table/headerCols/internal.html +1 -0
- package/src/api/exporters/html/__snapshots__/table/headerRows/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/table/headerRows/internal.html +1 -0
- package/src/api/exporters/html/__snapshots__/table/headersRows/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/table/headersRows/internal.html +1 -0
- package/src/api/exporters/html/__snapshots__/table/mixedCellColors/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/table/mixedCellColors/internal.html +1 -0
- package/src/api/exporters/html/__snapshots__/table/mixedRowspansAndColspans/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/table/mixedRowspansAndColspans/internal.html +1 -0
- package/src/api/exporters/markdown/__snapshots__/table/headerCols/markdown.md +4 -0
- package/src/api/exporters/markdown/__snapshots__/table/headerRows/markdown.md +4 -0
- package/src/api/exporters/markdown/__snapshots__/table/mixedCellColors/markdown.md +5 -0
- package/src/api/exporters/markdown/__snapshots__/table/mixedRowspansAndColspans/markdown.md +5 -0
- package/src/api/nodeConversions/__snapshots__/nodeConversions.test.ts.snap +985 -20
- package/src/api/nodeConversions/blockToNode.ts +63 -20
- package/src/api/nodeConversions/nodeToBlock.ts +75 -13
- package/src/api/parsers/html/__snapshots__/parse-notion-html.json +145 -54
- package/src/api/testUtil/cases/defaultSchema.ts +782 -9
- package/src/api/testUtil/partialBlockTestUtil.ts +39 -4
- package/src/blocks/TableBlockContent/TableBlockContent.ts +11 -5
- package/src/blocks/defaultBlockTypeGuards.ts +8 -0
- package/src/comments/index.ts +9 -0
- package/src/comments/models/User.ts +8 -0
- package/src/comments/threadstore/DefaultThreadStoreAuth.ts +106 -0
- package/src/comments/threadstore/ThreadStore.ts +134 -0
- package/src/comments/threadstore/ThreadStoreAuth.ts +13 -0
- package/src/comments/threadstore/TipTapThreadStore.ts +292 -0
- package/src/comments/threadstore/yjs/RESTYjsThreadStore.ts +144 -0
- package/src/comments/threadstore/yjs/YjsThreadStore.test.ts +294 -0
- package/src/comments/threadstore/yjs/YjsThreadStore.ts +340 -0
- package/src/comments/threadstore/yjs/YjsThreadStoreBase.ts +48 -0
- package/src/comments/threadstore/yjs/yjsHelpers.ts +121 -0
- package/src/comments/types.ts +117 -0
- package/src/editor/Block.css +16 -8
- package/src/editor/BlockNoteEditor.ts +269 -92
- package/src/editor/BlockNoteExtensions.ts +24 -1
- package/src/editor/BlockNoteTipTapEditor.ts +5 -1
- package/src/editor/editor.css +17 -0
- package/src/extensions/BackgroundColor/BackgroundColorExtension.ts +1 -1
- package/src/extensions/Comments/CommentMark.ts +61 -0
- package/src/extensions/Comments/CommentsPlugin.ts +301 -0
- package/src/extensions/Comments/userstore/UserStore.ts +72 -0
- package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +16 -10
- package/src/extensions/LinkToolbar/LinkToolbarPlugin.ts +3 -3
- package/src/extensions/ShowSelection/ShowSelectionPlugin.ts +52 -0
- package/src/extensions/SideMenu/SideMenuPlugin.ts +22 -9
- package/src/extensions/TableHandles/TableHandlesPlugin.ts +409 -57
- package/src/extensions/TextAlignment/TextAlignmentExtension.ts +2 -0
- package/src/extensions/TextColor/TextColorExtension.ts +1 -1
- package/src/extensions/UniqueID/UniqueID.ts +8 -3
- package/src/i18n/locales/ar.ts +23 -0
- package/src/i18n/locales/de.ts +15 -0
- package/src/i18n/locales/en.ts +25 -1
- package/src/i18n/locales/es.ts +16 -1
- package/src/i18n/locales/fr.ts +23 -0
- package/src/i18n/locales/hr.ts +18 -0
- package/src/i18n/locales/index.ts +1 -0
- package/src/i18n/locales/is.ts +24 -1
- package/src/i18n/locales/it.ts +21 -0
- package/src/i18n/locales/ja.ts +23 -0
- package/src/i18n/locales/ko.ts +23 -0
- package/src/i18n/locales/nl.ts +23 -0
- package/src/i18n/locales/no.ts +346 -0
- package/src/i18n/locales/pl.ts +23 -0
- package/src/i18n/locales/pt.ts +23 -0
- package/src/i18n/locales/ru.ts +23 -0
- package/src/i18n/locales/uk.ts +23 -0
- package/src/i18n/locales/vi.ts +23 -0
- package/src/i18n/locales/zh.ts +23 -0
- package/src/index.ts +6 -4
- package/src/schema/blocks/types.ts +32 -2
- package/src/util/browser.ts +1 -1
- package/src/util/table.ts +107 -0
- package/types/src/api/blockManipulation/tables/tables.d.ts +343 -0
- package/types/src/api/blockManipulation/tables/tables.test.d.ts +1 -0
- package/types/src/api/clipboard/toClipboard/copyExtension.d.ts +1 -1
- package/types/src/blocks/TableBlockContent/TableBlockContent.d.ts +1 -2
- package/types/src/blocks/defaultBlockTypeGuards.d.ts +3 -0
- package/types/src/comments/index.d.ts +9 -0
- package/types/src/comments/models/User.d.ts +8 -0
- package/types/src/comments/threadstore/DefaultThreadStoreAuth.d.ts +47 -0
- package/types/src/comments/threadstore/ThreadStore.d.ts +121 -0
- package/types/src/comments/threadstore/ThreadStoreAuth.d.ts +12 -0
- package/types/src/comments/threadstore/TipTapThreadStore.d.ts +97 -0
- package/types/src/comments/threadstore/yjs/RESTYjsThreadStore.d.ts +83 -0
- package/types/src/comments/threadstore/yjs/YjsThreadStore.d.ts +79 -0
- package/types/src/comments/threadstore/yjs/YjsThreadStore.test.d.ts +1 -0
- package/types/src/comments/threadstore/yjs/YjsThreadStoreBase.d.ts +15 -0
- package/types/src/comments/threadstore/yjs/yjsHelpers.d.ts +13 -0
- package/types/src/comments/types.d.ts +109 -0
- package/types/src/editor/BlockNoteEditor.d.ts +146 -66
- package/types/src/editor/BlockNoteExtensions.d.ts +4 -0
- package/types/src/extensions/Collaboration/createCollaborationExtensions.d.ts +1 -1
- package/types/src/extensions/Comments/CommentMark.d.ts +2 -0
- package/types/src/extensions/Comments/CommentsPlugin.d.ts +49 -0
- package/types/src/extensions/Comments/userstore/UserStore.d.ts +31 -0
- package/types/src/extensions/FormattingToolbar/FormattingToolbarPlugin.d.ts +1 -1
- package/types/src/extensions/ShowSelection/ShowSelectionPlugin.d.ts +15 -0
- package/types/src/extensions/SideMenu/SideMenuPlugin.d.ts +1 -0
- package/types/src/extensions/TableHandles/TableHandlesPlugin.d.ts +66 -1
- package/types/src/i18n/locales/de.d.ts +15 -0
- package/types/src/i18n/locales/en.d.ts +20 -0
- package/types/src/i18n/locales/es.d.ts +15 -0
- package/types/src/i18n/locales/hr.d.ts +18 -0
- package/types/src/i18n/locales/index.d.ts +1 -0
- package/types/src/i18n/locales/it.d.ts +21 -0
- package/types/src/i18n/locales/no.d.ts +2 -0
- package/types/src/index.d.ts +5 -4
- package/types/src/pm-nodes/BlockContainer.d.ts +2 -2
- package/types/src/pm-nodes/BlockGroup.d.ts +2 -2
- package/types/src/schema/blocks/types.d.ts +23 -2
- package/types/src/util/browser.d.ts +1 -1
- package/types/src/util/table.d.ts +12 -0
- package/dist/blocknote.umd.cjs +0 -11
- package/dist/blocknote.umd.cjs.map +0 -1
|
@@ -275,7 +275,34 @@ describe("Test updateBlock", () => {
|
|
|
275
275
|
type: "tableContent",
|
|
276
276
|
rows: [
|
|
277
277
|
{
|
|
278
|
-
cells: [
|
|
278
|
+
cells: [
|
|
279
|
+
{
|
|
280
|
+
type: "tableCell",
|
|
281
|
+
content: ["Cell 1"],
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
type: "tableCell",
|
|
285
|
+
content: ["Cell 2"],
|
|
286
|
+
props: {
|
|
287
|
+
backgroundColor: "red",
|
|
288
|
+
colspan: 1,
|
|
289
|
+
rowspan: 1,
|
|
290
|
+
textAlignment: "right",
|
|
291
|
+
textColor: "red",
|
|
292
|
+
},
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
type: "tableCell",
|
|
296
|
+
content: ["Cell 3"],
|
|
297
|
+
props: {
|
|
298
|
+
backgroundColor: "default",
|
|
299
|
+
colspan: 1,
|
|
300
|
+
rowspan: 1,
|
|
301
|
+
textAlignment: "left",
|
|
302
|
+
textColor: "default",
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
],
|
|
279
306
|
},
|
|
280
307
|
{
|
|
281
308
|
cells: ["Cell 4", "Cell 5", "Cell 6"],
|
|
@@ -222,7 +222,7 @@ function updateChildren<
|
|
|
222
222
|
editor: BlockNoteEditor<BSchema, I, S>,
|
|
223
223
|
blockInfo: BlockInfo
|
|
224
224
|
) {
|
|
225
|
-
if (block.children !== undefined) {
|
|
225
|
+
if (block.children !== undefined && block.children.length > 0) {
|
|
226
226
|
const childNodes = block.children.map((child) => {
|
|
227
227
|
return blockToNode(child, state.schema, editor.schema.styleSchema);
|
|
228
228
|
});
|
|
@@ -317,80 +317,172 @@ exports[`Test getSelection & setSelection > Ends in table 1`] = `
|
|
|
317
317
|
undefined,
|
|
318
318
|
undefined,
|
|
319
319
|
],
|
|
320
|
+
"headerCols": undefined,
|
|
321
|
+
"headerRows": undefined,
|
|
320
322
|
"rows": [
|
|
321
323
|
{
|
|
322
324
|
"cells": [
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
325
|
+
{
|
|
326
|
+
"content": [
|
|
327
|
+
{
|
|
328
|
+
"styles": {},
|
|
329
|
+
"text": "Cell 1",
|
|
330
|
+
"type": "text",
|
|
331
|
+
},
|
|
332
|
+
],
|
|
333
|
+
"props": {
|
|
334
|
+
"backgroundColor": "default",
|
|
335
|
+
"colspan": 1,
|
|
336
|
+
"rowspan": 1,
|
|
337
|
+
"textAlignment": "left",
|
|
338
|
+
"textColor": "default",
|
|
328
339
|
},
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
340
|
+
"type": "tableCell",
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"content": [
|
|
344
|
+
{
|
|
345
|
+
"styles": {},
|
|
346
|
+
"text": "Cell 2",
|
|
347
|
+
"type": "text",
|
|
348
|
+
},
|
|
349
|
+
],
|
|
350
|
+
"props": {
|
|
351
|
+
"backgroundColor": "default",
|
|
352
|
+
"colspan": 1,
|
|
353
|
+
"rowspan": 1,
|
|
354
|
+
"textAlignment": "left",
|
|
355
|
+
"textColor": "default",
|
|
335
356
|
},
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
357
|
+
"type": "tableCell",
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"content": [
|
|
361
|
+
{
|
|
362
|
+
"styles": {},
|
|
363
|
+
"text": "Cell 3",
|
|
364
|
+
"type": "text",
|
|
365
|
+
},
|
|
366
|
+
],
|
|
367
|
+
"props": {
|
|
368
|
+
"backgroundColor": "default",
|
|
369
|
+
"colspan": 1,
|
|
370
|
+
"rowspan": 1,
|
|
371
|
+
"textAlignment": "left",
|
|
372
|
+
"textColor": "default",
|
|
342
373
|
},
|
|
343
|
-
|
|
374
|
+
"type": "tableCell",
|
|
375
|
+
},
|
|
344
376
|
],
|
|
345
377
|
},
|
|
346
378
|
{
|
|
347
379
|
"cells": [
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
380
|
+
{
|
|
381
|
+
"content": [
|
|
382
|
+
{
|
|
383
|
+
"styles": {},
|
|
384
|
+
"text": "Cell 4",
|
|
385
|
+
"type": "text",
|
|
386
|
+
},
|
|
387
|
+
],
|
|
388
|
+
"props": {
|
|
389
|
+
"backgroundColor": "default",
|
|
390
|
+
"colspan": 1,
|
|
391
|
+
"rowspan": 1,
|
|
392
|
+
"textAlignment": "left",
|
|
393
|
+
"textColor": "default",
|
|
353
394
|
},
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
395
|
+
"type": "tableCell",
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"content": [
|
|
399
|
+
{
|
|
400
|
+
"styles": {},
|
|
401
|
+
"text": "Cell 5",
|
|
402
|
+
"type": "text",
|
|
403
|
+
},
|
|
404
|
+
],
|
|
405
|
+
"props": {
|
|
406
|
+
"backgroundColor": "default",
|
|
407
|
+
"colspan": 1,
|
|
408
|
+
"rowspan": 1,
|
|
409
|
+
"textAlignment": "left",
|
|
410
|
+
"textColor": "default",
|
|
360
411
|
},
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
412
|
+
"type": "tableCell",
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
"content": [
|
|
416
|
+
{
|
|
417
|
+
"styles": {},
|
|
418
|
+
"text": "Cell 6",
|
|
419
|
+
"type": "text",
|
|
420
|
+
},
|
|
421
|
+
],
|
|
422
|
+
"props": {
|
|
423
|
+
"backgroundColor": "default",
|
|
424
|
+
"colspan": 1,
|
|
425
|
+
"rowspan": 1,
|
|
426
|
+
"textAlignment": "left",
|
|
427
|
+
"textColor": "default",
|
|
367
428
|
},
|
|
368
|
-
|
|
429
|
+
"type": "tableCell",
|
|
430
|
+
},
|
|
369
431
|
],
|
|
370
432
|
},
|
|
371
433
|
{
|
|
372
434
|
"cells": [
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
435
|
+
{
|
|
436
|
+
"content": [
|
|
437
|
+
{
|
|
438
|
+
"styles": {},
|
|
439
|
+
"text": "Cell 7",
|
|
440
|
+
"type": "text",
|
|
441
|
+
},
|
|
442
|
+
],
|
|
443
|
+
"props": {
|
|
444
|
+
"backgroundColor": "default",
|
|
445
|
+
"colspan": 1,
|
|
446
|
+
"rowspan": 1,
|
|
447
|
+
"textAlignment": "left",
|
|
448
|
+
"textColor": "default",
|
|
378
449
|
},
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
450
|
+
"type": "tableCell",
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"content": [
|
|
454
|
+
{
|
|
455
|
+
"styles": {},
|
|
456
|
+
"text": "Cell 8",
|
|
457
|
+
"type": "text",
|
|
458
|
+
},
|
|
459
|
+
],
|
|
460
|
+
"props": {
|
|
461
|
+
"backgroundColor": "default",
|
|
462
|
+
"colspan": 1,
|
|
463
|
+
"rowspan": 1,
|
|
464
|
+
"textAlignment": "left",
|
|
465
|
+
"textColor": "default",
|
|
385
466
|
},
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
467
|
+
"type": "tableCell",
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"content": [
|
|
471
|
+
{
|
|
472
|
+
"styles": {},
|
|
473
|
+
"text": "Cell 9",
|
|
474
|
+
"type": "text",
|
|
475
|
+
},
|
|
476
|
+
],
|
|
477
|
+
"props": {
|
|
478
|
+
"backgroundColor": "default",
|
|
479
|
+
"colspan": 1,
|
|
480
|
+
"rowspan": 1,
|
|
481
|
+
"textAlignment": "left",
|
|
482
|
+
"textColor": "default",
|
|
392
483
|
},
|
|
393
|
-
|
|
484
|
+
"type": "tableCell",
|
|
485
|
+
},
|
|
394
486
|
],
|
|
395
487
|
},
|
|
396
488
|
],
|
|
@@ -553,80 +645,172 @@ exports[`Test getSelection & setSelection > Starts in table 1`] = `
|
|
|
553
645
|
undefined,
|
|
554
646
|
undefined,
|
|
555
647
|
],
|
|
648
|
+
"headerCols": undefined,
|
|
649
|
+
"headerRows": undefined,
|
|
556
650
|
"rows": [
|
|
557
651
|
{
|
|
558
652
|
"cells": [
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
653
|
+
{
|
|
654
|
+
"content": [
|
|
655
|
+
{
|
|
656
|
+
"styles": {},
|
|
657
|
+
"text": "Cell 1",
|
|
658
|
+
"type": "text",
|
|
659
|
+
},
|
|
660
|
+
],
|
|
661
|
+
"props": {
|
|
662
|
+
"backgroundColor": "default",
|
|
663
|
+
"colspan": 1,
|
|
664
|
+
"rowspan": 1,
|
|
665
|
+
"textAlignment": "left",
|
|
666
|
+
"textColor": "default",
|
|
564
667
|
},
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
668
|
+
"type": "tableCell",
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
"content": [
|
|
672
|
+
{
|
|
673
|
+
"styles": {},
|
|
674
|
+
"text": "Cell 2",
|
|
675
|
+
"type": "text",
|
|
676
|
+
},
|
|
677
|
+
],
|
|
678
|
+
"props": {
|
|
679
|
+
"backgroundColor": "default",
|
|
680
|
+
"colspan": 1,
|
|
681
|
+
"rowspan": 1,
|
|
682
|
+
"textAlignment": "left",
|
|
683
|
+
"textColor": "default",
|
|
571
684
|
},
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
685
|
+
"type": "tableCell",
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
"content": [
|
|
689
|
+
{
|
|
690
|
+
"styles": {},
|
|
691
|
+
"text": "Cell 3",
|
|
692
|
+
"type": "text",
|
|
693
|
+
},
|
|
694
|
+
],
|
|
695
|
+
"props": {
|
|
696
|
+
"backgroundColor": "default",
|
|
697
|
+
"colspan": 1,
|
|
698
|
+
"rowspan": 1,
|
|
699
|
+
"textAlignment": "left",
|
|
700
|
+
"textColor": "default",
|
|
578
701
|
},
|
|
579
|
-
|
|
702
|
+
"type": "tableCell",
|
|
703
|
+
},
|
|
580
704
|
],
|
|
581
705
|
},
|
|
582
706
|
{
|
|
583
707
|
"cells": [
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
708
|
+
{
|
|
709
|
+
"content": [
|
|
710
|
+
{
|
|
711
|
+
"styles": {},
|
|
712
|
+
"text": "Cell 4",
|
|
713
|
+
"type": "text",
|
|
714
|
+
},
|
|
715
|
+
],
|
|
716
|
+
"props": {
|
|
717
|
+
"backgroundColor": "default",
|
|
718
|
+
"colspan": 1,
|
|
719
|
+
"rowspan": 1,
|
|
720
|
+
"textAlignment": "left",
|
|
721
|
+
"textColor": "default",
|
|
589
722
|
},
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
723
|
+
"type": "tableCell",
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
"content": [
|
|
727
|
+
{
|
|
728
|
+
"styles": {},
|
|
729
|
+
"text": "Cell 5",
|
|
730
|
+
"type": "text",
|
|
731
|
+
},
|
|
732
|
+
],
|
|
733
|
+
"props": {
|
|
734
|
+
"backgroundColor": "default",
|
|
735
|
+
"colspan": 1,
|
|
736
|
+
"rowspan": 1,
|
|
737
|
+
"textAlignment": "left",
|
|
738
|
+
"textColor": "default",
|
|
596
739
|
},
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
740
|
+
"type": "tableCell",
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
"content": [
|
|
744
|
+
{
|
|
745
|
+
"styles": {},
|
|
746
|
+
"text": "Cell 6",
|
|
747
|
+
"type": "text",
|
|
748
|
+
},
|
|
749
|
+
],
|
|
750
|
+
"props": {
|
|
751
|
+
"backgroundColor": "default",
|
|
752
|
+
"colspan": 1,
|
|
753
|
+
"rowspan": 1,
|
|
754
|
+
"textAlignment": "left",
|
|
755
|
+
"textColor": "default",
|
|
603
756
|
},
|
|
604
|
-
|
|
757
|
+
"type": "tableCell",
|
|
758
|
+
},
|
|
605
759
|
],
|
|
606
760
|
},
|
|
607
761
|
{
|
|
608
762
|
"cells": [
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
763
|
+
{
|
|
764
|
+
"content": [
|
|
765
|
+
{
|
|
766
|
+
"styles": {},
|
|
767
|
+
"text": "Cell 7",
|
|
768
|
+
"type": "text",
|
|
769
|
+
},
|
|
770
|
+
],
|
|
771
|
+
"props": {
|
|
772
|
+
"backgroundColor": "default",
|
|
773
|
+
"colspan": 1,
|
|
774
|
+
"rowspan": 1,
|
|
775
|
+
"textAlignment": "left",
|
|
776
|
+
"textColor": "default",
|
|
614
777
|
},
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
778
|
+
"type": "tableCell",
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
"content": [
|
|
782
|
+
{
|
|
783
|
+
"styles": {},
|
|
784
|
+
"text": "Cell 8",
|
|
785
|
+
"type": "text",
|
|
786
|
+
},
|
|
787
|
+
],
|
|
788
|
+
"props": {
|
|
789
|
+
"backgroundColor": "default",
|
|
790
|
+
"colspan": 1,
|
|
791
|
+
"rowspan": 1,
|
|
792
|
+
"textAlignment": "left",
|
|
793
|
+
"textColor": "default",
|
|
621
794
|
},
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
795
|
+
"type": "tableCell",
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
"content": [
|
|
799
|
+
{
|
|
800
|
+
"styles": {},
|
|
801
|
+
"text": "Cell 9",
|
|
802
|
+
"type": "text",
|
|
803
|
+
},
|
|
804
|
+
],
|
|
805
|
+
"props": {
|
|
806
|
+
"backgroundColor": "default",
|
|
807
|
+
"colspan": 1,
|
|
808
|
+
"rowspan": 1,
|
|
809
|
+
"textAlignment": "left",
|
|
810
|
+
"textColor": "default",
|
|
628
811
|
},
|
|
629
|
-
|
|
812
|
+
"type": "tableCell",
|
|
813
|
+
},
|
|
630
814
|
],
|
|
631
815
|
},
|
|
632
816
|
],
|
|
@@ -117,7 +117,20 @@ const testDocument: PartialBlock[] = [
|
|
|
117
117
|
type: "tableContent",
|
|
118
118
|
rows: [
|
|
119
119
|
{
|
|
120
|
-
cells: [
|
|
120
|
+
cells: [
|
|
121
|
+
{
|
|
122
|
+
type: "tableCell",
|
|
123
|
+
content: ["Cell 1"],
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
type: "tableCell",
|
|
127
|
+
content: ["Cell 2"],
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
type: "tableCell",
|
|
131
|
+
content: ["Cell 3"],
|
|
132
|
+
},
|
|
133
|
+
],
|
|
121
134
|
},
|
|
122
135
|
{
|
|
123
136
|
cells: ["Cell 4", "Cell 5", "Cell 6"],
|