@blocknote/core 0.5.1 → 0.6.2

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.
Files changed (39) hide show
  1. package/dist/blocknote.js +1126 -1031
  2. package/dist/blocknote.js.map +1 -1
  3. package/dist/blocknote.umd.cjs +2 -2
  4. package/dist/blocknote.umd.cjs.map +1 -1
  5. package/dist/style.css +1 -1
  6. package/package.json +2 -2
  7. package/src/BlockNoteEditor.ts +246 -4
  8. package/src/BlockNoteExtensions.ts +3 -2
  9. package/src/api/blockManipulation/__snapshots__/blockManipulation.test.ts.snap +35 -35
  10. package/src/api/formatConversions/__snapshots__/formatConversions.test.ts.snap +10 -10
  11. package/src/api/nodeConversions/__snapshots__/nodeConversions.test.ts.snap +10 -10
  12. package/src/api/nodeConversions/nodeConversions.ts +11 -10
  13. package/src/editor.module.css +11 -2
  14. package/src/extensions/Blocks/api/inlineContentTypes.ts +3 -2
  15. package/src/extensions/Blocks/api/selectionTypes.ts +5 -0
  16. package/src/extensions/Blocks/nodes/Block.module.css +20 -2
  17. package/src/extensions/DraggableBlocks/BlockSideMenuFactoryTypes.ts +5 -6
  18. package/src/extensions/DraggableBlocks/DraggableBlocksExtension.ts +5 -2
  19. package/src/extensions/DraggableBlocks/DraggableBlocksPlugin.ts +76 -113
  20. package/src/extensions/FormattingToolbar/FormattingToolbarExtension.ts +6 -3
  21. package/src/extensions/FormattingToolbar/FormattingToolbarFactoryTypes.ts +2 -34
  22. package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +39 -113
  23. package/src/extensions/HyperlinkToolbar/HyperlinkToolbarPlugin.ts +56 -39
  24. package/src/extensions/UniqueID/UniqueID.ts +1 -1
  25. package/src/index.ts +1 -0
  26. package/src/shared/plugins/suggestion/SuggestionPlugin.ts +14 -2
  27. package/types/src/BlockNoteEditor.d.ts +81 -1
  28. package/types/src/extensions/Blocks/api/inlineContentTypes.d.ts +3 -2
  29. package/types/src/extensions/Blocks/api/selectionTypes.d.ts +4 -0
  30. package/types/src/extensions/DraggableBlocks/BlockSideMenuFactoryTypes.d.ts +4 -5
  31. package/types/src/extensions/DraggableBlocks/DraggableBlocksExtension.d.ts +3 -1
  32. package/types/src/extensions/DraggableBlocks/DraggableBlocksPlugin.d.ts +14 -16
  33. package/types/src/extensions/FormattingToolbar/FormattingToolbarExtension.d.ts +2 -0
  34. package/types/src/extensions/FormattingToolbar/FormattingToolbarFactoryTypes.d.ts +2 -25
  35. package/types/src/extensions/FormattingToolbar/FormattingToolbarPlugin.d.ts +9 -4
  36. package/types/src/index.d.ts +1 -0
  37. package/types/src/api/Editor.d.ts +0 -93
  38. package/types/src/extensions/SlashMenu/SlashMenuItem.d.ts +0 -24
  39. package/types/src/extensions/SlashMenu/defaultSlashCommands.d.ts +0 -5
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "homepage": "https://github.com/TypeCellOS/BlockNote",
4
4
  "private": false,
5
5
  "license": "MPL-2.0",
6
- "version": "0.5.1",
6
+ "version": "0.6.2",
7
7
  "files": [
8
8
  "dist",
9
9
  "types",
@@ -109,5 +109,5 @@
109
109
  "access": "public",
110
110
  "registry": "https://registry.npmjs.org/"
111
111
  },
112
- "gitHead": "babb5daf39a4cfa7dff192098b7a7a35b022623f"
112
+ "gitHead": "51407afbd8f4976d6ff986b9edb5e242786c1c58"
113
113
  }
@@ -23,7 +23,13 @@ import {
23
23
  BlockIdentifier,
24
24
  PartialBlock,
25
25
  } from "./extensions/Blocks/api/blockTypes";
26
+ import {
27
+ ColorStyle,
28
+ Styles,
29
+ ToggledStyle,
30
+ } from "./extensions/Blocks/api/inlineContentTypes";
26
31
  import { TextCursorPosition } from "./extensions/Blocks/api/cursorPositionTypes";
32
+ import { Selection } from "./extensions/Blocks/api/selectionTypes";
27
33
  import { getBlockInfoFromPos } from "./extensions/Blocks/helpers/getBlockInfoFromPos";
28
34
  import {
29
35
  BaseSlashMenuItem,
@@ -35,7 +41,8 @@ export type BlockNoteEditorOptions = {
35
41
  enableBlockNoteExtensions: boolean;
36
42
  disableHistoryExtension: boolean;
37
43
  /**
38
- * Factories used to create a custom UI for BlockNote
44
+ * UI element factories for creating a custom UI, including custom positioning
45
+ * & rendering.
39
46
  */
40
47
  uiFactories: UiFactories;
41
48
  /**
@@ -69,14 +76,26 @@ export type BlockNoteEditorOptions = {
69
76
  * A callback function that runs whenever the text cursor position changes.
70
77
  */
71
78
  onTextCursorPositionChange: (editor: BlockNoteEditor) => void;
79
+ /**
80
+ * Locks the editor from being editable by the user if set to `false`.
81
+ */
82
+ editable: boolean;
83
+ /**
84
+ * The content that should be in the editor when it's created, represented as an array of partial block objects.
85
+ */
72
86
  initialContent: PartialBlock[];
73
-
74
87
  /**
75
88
  * Use default BlockNote font and reset the styles of <p> <li> <h1> elements etc., that are used in BlockNote.
76
89
  *
77
90
  * @default true
78
91
  */
79
92
  defaultStyles: boolean;
93
+ /**
94
+ * Whether to use the light or dark theme.
95
+ *
96
+ * @default "light"
97
+ */
98
+ theme: "light" | "dark";
80
99
 
81
100
  // tiptap options, undocumented
82
101
  _tiptapOptions: any;
@@ -96,6 +115,10 @@ export class BlockNoteEditor {
96
115
  return this._tiptapEditor.view.dom as HTMLDivElement;
97
116
  }
98
117
 
118
+ public focus() {
119
+ this._tiptapEditor.view.focus();
120
+ }
121
+
99
122
  constructor(options: Partial<BlockNoteEditorOptions> = {}) {
100
123
  // apply defaults
101
124
  options = {
@@ -134,12 +157,14 @@ export class BlockNoteEditor {
134
157
  onSelectionUpdate: () => {
135
158
  options.onTextCursorPositionChange?.(this);
136
159
  },
160
+ editable: options.editable === undefined ? true : options.editable,
137
161
  extensions:
138
162
  options.enableBlockNoteExtensions === false
139
163
  ? options._tiptapOptions?.extensions
140
164
  : [...(options._tiptapOptions?.extensions || []), ...extensions],
141
165
  editorProps: {
142
166
  attributes: {
167
+ "data-theme": options.theme || "light",
143
168
  ...(options.editorDOMAttributes || {}),
144
169
  class: [
145
170
  styles.bnEditor,
@@ -222,7 +247,7 @@ export class BlockNoteEditor {
222
247
 
223
248
  function traverseBlockArray(blockArray: Block[]): boolean {
224
249
  for (const block of blockArray) {
225
- if (callback(block) === false) {
250
+ if (!callback(block)) {
226
251
  return false;
227
252
  }
228
253
 
@@ -230,7 +255,7 @@ export class BlockNoteEditor {
230
255
  ? block.children.slice().reverse()
231
256
  : block.children;
232
257
 
233
- if (traverseBlockArray(children) === false) {
258
+ if (!traverseBlockArray(children)) {
234
259
  return false;
235
260
  }
236
261
  }
@@ -312,6 +337,60 @@ export class BlockNoteEditor {
312
337
  }
313
338
  }
314
339
 
340
+ /**
341
+ * Gets a snapshot of the current selection.
342
+ */
343
+ public getSelection(): Selection | undefined {
344
+ if (
345
+ this._tiptapEditor.state.selection.from ===
346
+ this._tiptapEditor.state.selection.to
347
+ ) {
348
+ return undefined;
349
+ }
350
+
351
+ const blocks: Block[] = [];
352
+
353
+ this._tiptapEditor.state.doc.descendants((node, pos) => {
354
+ if (node.type.spec.group !== "blockContent") {
355
+ return true;
356
+ }
357
+
358
+ if (
359
+ pos + node.nodeSize < this._tiptapEditor.state.selection.from ||
360
+ pos > this._tiptapEditor.state.selection.to
361
+ ) {
362
+ return true;
363
+ }
364
+
365
+ blocks.push(
366
+ nodeToBlock(
367
+ this._tiptapEditor.state.doc.resolve(pos).node(),
368
+ this.blockCache
369
+ )
370
+ );
371
+
372
+ return false;
373
+ });
374
+
375
+ return { blocks: blocks };
376
+ }
377
+
378
+ /**
379
+ * Checks if the editor is currently editable, or if it's locked.
380
+ * @returns True if the editor is editable, false otherwise.
381
+ */
382
+ public get isEditable(): boolean {
383
+ return this._tiptapEditor.isEditable;
384
+ }
385
+
386
+ /**
387
+ * Makes the editor editable or locks it, depending on the argument passed.
388
+ * @param editable True to make the editor editable, or false to lock it.
389
+ */
390
+ public set isEditable(editable: boolean) {
391
+ this._tiptapEditor.setEditable(editable);
392
+ }
393
+
315
394
  /**
316
395
  * Inserts new blocks into the editor. If a block's `id` is undefined, BlockNote generates one automatically. Throws an
317
396
  * error if the reference block could not be found.
@@ -361,6 +440,169 @@ export class BlockNoteEditor {
361
440
  replaceBlocks(blocksToRemove, blocksToInsert, this._tiptapEditor);
362
441
  }
363
442
 
443
+ /**
444
+ * Gets the active text styles at the text cursor position or at the end of the current selection if it's active.
445
+ */
446
+ public getActiveStyles() {
447
+ const styles: Styles = {};
448
+ const marks = this._tiptapEditor.state.selection.$to.marks();
449
+
450
+ const toggleStyles = new Set<ToggledStyle>([
451
+ "bold",
452
+ "italic",
453
+ "underline",
454
+ "strike",
455
+ "code",
456
+ ]);
457
+ const colorStyles = new Set<ColorStyle>(["textColor", "backgroundColor"]);
458
+
459
+ for (const mark of marks) {
460
+ if (toggleStyles.has(mark.type.name as ToggledStyle)) {
461
+ styles[mark.type.name as ToggledStyle] = true;
462
+ } else if (colorStyles.has(mark.type.name as ColorStyle)) {
463
+ styles[mark.type.name as ColorStyle] = mark.attrs.color;
464
+ }
465
+ }
466
+
467
+ return styles;
468
+ }
469
+
470
+ /**
471
+ * Adds styles to the currently selected content.
472
+ * @param styles The styles to add.
473
+ */
474
+ public addStyles(styles: Styles) {
475
+ const toggleStyles = new Set<ToggledStyle>([
476
+ "bold",
477
+ "italic",
478
+ "underline",
479
+ "strike",
480
+ "code",
481
+ ]);
482
+ const colorStyles = new Set<ColorStyle>(["textColor", "backgroundColor"]);
483
+
484
+ for (const [style, value] of Object.entries(styles)) {
485
+ if (toggleStyles.has(style as ToggledStyle)) {
486
+ this._tiptapEditor.commands.setMark(style);
487
+ } else if (colorStyles.has(style as ColorStyle)) {
488
+ this._tiptapEditor.commands.setMark(style, { color: value });
489
+ }
490
+ }
491
+ }
492
+
493
+ /**
494
+ * Removes styles from the currently selected content.
495
+ * @param styles The styles to remove.
496
+ */
497
+ public removeStyles(styles: Styles) {
498
+ for (const style of Object.keys(styles)) {
499
+ this._tiptapEditor.commands.unsetMark(style);
500
+ }
501
+ }
502
+
503
+ /**
504
+ * Toggles styles on the currently selected content.
505
+ * @param styles The styles to toggle.
506
+ */
507
+ public toggleStyles(styles: Styles) {
508
+ const toggleStyles = new Set<ToggledStyle>([
509
+ "bold",
510
+ "italic",
511
+ "underline",
512
+ "strike",
513
+ "code",
514
+ ]);
515
+ const colorStyles = new Set<ColorStyle>(["textColor", "backgroundColor"]);
516
+
517
+ for (const [style, value] of Object.entries(styles)) {
518
+ if (toggleStyles.has(style as ToggledStyle)) {
519
+ this._tiptapEditor.commands.toggleMark(style);
520
+ } else if (colorStyles.has(style as ColorStyle)) {
521
+ this._tiptapEditor.commands.toggleMark(style, { color: value });
522
+ }
523
+ }
524
+ }
525
+
526
+ /**
527
+ * Gets the currently selected text.
528
+ */
529
+ public getSelectedText() {
530
+ return this._tiptapEditor.state.doc.textBetween(
531
+ this._tiptapEditor.state.selection.from,
532
+ this._tiptapEditor.state.selection.to
533
+ );
534
+ }
535
+
536
+ /**
537
+ * Gets the URL of the last link in the current selection, or `undefined` if there are no links in the selection.
538
+ */
539
+ public getSelectedLinkUrl() {
540
+ return this._tiptapEditor.getAttributes("link").href as string | undefined;
541
+ }
542
+
543
+ /**
544
+ * Creates a new link to replace the selected content.
545
+ * @param url The link URL.
546
+ * @param text The text to display the link with.
547
+ */
548
+ public createLink(url: string, text?: string) {
549
+ if (url === "") {
550
+ return;
551
+ }
552
+
553
+ let { from, to } = this._tiptapEditor.state.selection;
554
+
555
+ if (!text) {
556
+ text = this._tiptapEditor.state.doc.textBetween(from, to);
557
+ }
558
+
559
+ const mark = this._tiptapEditor.schema.mark("link", { href: url });
560
+
561
+ this._tiptapEditor.view.dispatch(
562
+ this._tiptapEditor.view.state.tr
563
+ .insertText(text, from, to)
564
+ .addMark(from, from + text.length, mark)
565
+ );
566
+ }
567
+
568
+ /**
569
+ * Checks if the block containing the text cursor can be nested.
570
+ */
571
+ public canNestBlock() {
572
+ const { startPos, depth } = getBlockInfoFromPos(
573
+ this._tiptapEditor.state.doc,
574
+ this._tiptapEditor.state.selection.from
575
+ )!;
576
+
577
+ return this._tiptapEditor.state.doc.resolve(startPos).index(depth - 1) > 0;
578
+ }
579
+
580
+ /**
581
+ * Nests the block containing the text cursor into the block above it.
582
+ */
583
+ public nestBlock() {
584
+ this._tiptapEditor.commands.sinkListItem("blockContainer");
585
+ }
586
+
587
+ /**
588
+ * Checks if the block containing the text cursor is nested.
589
+ */
590
+ public canUnnestBlock() {
591
+ const { depth } = getBlockInfoFromPos(
592
+ this._tiptapEditor.state.doc,
593
+ this._tiptapEditor.state.selection.from
594
+ )!;
595
+
596
+ return depth > 2;
597
+ }
598
+
599
+ /**
600
+ * Lifts the block containing the text cursor out of its parent.
601
+ */
602
+ public unnestBlock() {
603
+ this._tiptapEditor.commands.liftListItem("blockContainer");
604
+ }
605
+
364
606
  /**
365
607
  * Serializes blocks into an HTML string. To better conform to HTML standards, children of blocks which aren't list
366
608
  * items are un-nested in the output HTML.
@@ -24,8 +24,7 @@ import { FormattingToolbarFactory } from "./extensions/FormattingToolbar/Formatt
24
24
  import HyperlinkMark from "./extensions/HyperlinkToolbar/HyperlinkMark";
25
25
  import { HyperlinkToolbarFactory } from "./extensions/HyperlinkToolbar/HyperlinkToolbarFactoryTypes";
26
26
  import { Placeholder } from "./extensions/Placeholder/PlaceholderExtension";
27
- import { SlashMenuExtension } from "./extensions/SlashMenu";
28
- import { BaseSlashMenuItem } from "./extensions/SlashMenu";
27
+ import { BaseSlashMenuItem, SlashMenuExtension } from "./extensions/SlashMenu";
29
28
  import { TextAlignmentExtension } from "./extensions/TextAlignment/TextAlignmentExtension";
30
29
  import { TextColorExtension } from "./extensions/TextColor/TextColorExtension";
31
30
  import { TextColorMark } from "./extensions/TextColor/TextColorMark";
@@ -100,6 +99,7 @@ export const getBlockNoteExtensions = (opts: {
100
99
  if (opts.uiFactories.blockSideMenuFactory) {
101
100
  ret.push(
102
101
  DraggableBlocksExtension.configure({
102
+ editor: opts.editor,
103
103
  blockSideMenuFactory: opts.uiFactories.blockSideMenuFactory,
104
104
  })
105
105
  );
@@ -108,6 +108,7 @@ export const getBlockNoteExtensions = (opts: {
108
108
  if (opts.uiFactories.formattingToolbarFactory) {
109
109
  ret.push(
110
110
  FormattingToolbarExtension.configure({
111
+ editor: opts.editor,
111
112
  formattingToolbarFactory: opts.uiFactories.formattingToolbarFactory,
112
113
  })
113
114
  );
@@ -13,7 +13,7 @@ exports[`Insert, Update, & Delete Blocks > Insert, update, & delete multiple blo
13
13
  "type": "text",
14
14
  },
15
15
  ],
16
- "id": 2,
16
+ "id": "2",
17
17
  "props": {
18
18
  "backgroundColor": "default",
19
19
  "level": "1",
@@ -30,7 +30,7 @@ exports[`Insert, Update, & Delete Blocks > Insert, update, & delete multiple blo
30
30
  "type": "text",
31
31
  },
32
32
  ],
33
- "id": 1,
33
+ "id": "1",
34
34
  "props": {
35
35
  "backgroundColor": "default",
36
36
  "level": "1",
@@ -50,7 +50,7 @@ exports[`Insert, Update, & Delete Blocks > Insert, update, & delete multiple blo
50
50
  "type": "text",
51
51
  },
52
52
  ],
53
- "id": 4,
53
+ "id": "4",
54
54
  "props": {
55
55
  "backgroundColor": "default",
56
56
  "level": "2",
@@ -67,7 +67,7 @@ exports[`Insert, Update, & Delete Blocks > Insert, update, & delete multiple blo
67
67
  "type": "text",
68
68
  },
69
69
  ],
70
- "id": 3,
70
+ "id": "3",
71
71
  "props": {
72
72
  "backgroundColor": "default",
73
73
  "level": "2",
@@ -79,7 +79,7 @@ exports[`Insert, Update, & Delete Blocks > Insert, update, & delete multiple blo
79
79
  {
80
80
  "children": [],
81
81
  "content": [],
82
- "id": 0,
82
+ "id": "0",
83
83
  "props": {
84
84
  "backgroundColor": "default",
85
85
  "textAlignment": "left",
@@ -103,7 +103,7 @@ exports[`Insert, Update, & Delete Blocks > Insert, update, & delete multiple blo
103
103
  "type": "text",
104
104
  },
105
105
  ],
106
- "id": 2,
106
+ "id": "2",
107
107
  "props": {
108
108
  "backgroundColor": "default",
109
109
  "level": "1",
@@ -120,7 +120,7 @@ exports[`Insert, Update, & Delete Blocks > Insert, update, & delete multiple blo
120
120
  "type": "text",
121
121
  },
122
122
  ],
123
- "id": 1,
123
+ "id": "1",
124
124
  "props": {
125
125
  "backgroundColor": "default",
126
126
  "textAlignment": "left",
@@ -139,7 +139,7 @@ exports[`Insert, Update, & Delete Blocks > Insert, update, & delete multiple blo
139
139
  "type": "text",
140
140
  },
141
141
  ],
142
- "id": 4,
142
+ "id": "4",
143
143
  "props": {
144
144
  "backgroundColor": "default",
145
145
  "level": "2",
@@ -156,7 +156,7 @@ exports[`Insert, Update, & Delete Blocks > Insert, update, & delete multiple blo
156
156
  "type": "text",
157
157
  },
158
158
  ],
159
- "id": 3,
159
+ "id": "3",
160
160
  "props": {
161
161
  "backgroundColor": "default",
162
162
  "level": "2",
@@ -168,7 +168,7 @@ exports[`Insert, Update, & Delete Blocks > Insert, update, & delete multiple blo
168
168
  {
169
169
  "children": [],
170
170
  "content": [],
171
- "id": 0,
171
+ "id": "0",
172
172
  "props": {
173
173
  "backgroundColor": "default",
174
174
  "textAlignment": "left",
@@ -190,7 +190,7 @@ exports[`Insert, Update, & Delete Blocks > Insert, update, & delete multiple blo
190
190
  "type": "text",
191
191
  },
192
192
  ],
193
- "id": 1,
193
+ "id": "1",
194
194
  "props": {
195
195
  "backgroundColor": "default",
196
196
  "textAlignment": "left",
@@ -201,7 +201,7 @@ exports[`Insert, Update, & Delete Blocks > Insert, update, & delete multiple blo
201
201
  {
202
202
  "children": [],
203
203
  "content": [],
204
- "id": 0,
204
+ "id": "0",
205
205
  "props": {
206
206
  "backgroundColor": "default",
207
207
  "textAlignment": "left",
@@ -223,7 +223,7 @@ exports[`Insert, Update, & Delete Blocks > Insert, update, & delete single block
223
223
  "type": "text",
224
224
  },
225
225
  ],
226
- "id": 1,
226
+ "id": "1",
227
227
  "props": {
228
228
  "backgroundColor": "default",
229
229
  "textAlignment": "left",
@@ -234,7 +234,7 @@ exports[`Insert, Update, & Delete Blocks > Insert, update, & delete single block
234
234
  {
235
235
  "children": [],
236
236
  "content": [],
237
- "id": 0,
237
+ "id": "0",
238
238
  "props": {
239
239
  "backgroundColor": "default",
240
240
  "textAlignment": "left",
@@ -258,7 +258,7 @@ exports[`Insert, Update, & Delete Blocks > Insert, update, & delete single block
258
258
  "type": "text",
259
259
  },
260
260
  ],
261
- "id": 2,
261
+ "id": "2",
262
262
  "props": {
263
263
  "backgroundColor": "default",
264
264
  "textAlignment": "left",
@@ -283,7 +283,7 @@ exports[`Insert, Update, & Delete Blocks > Insert, update, & delete single block
283
283
  "type": "text",
284
284
  },
285
285
  ],
286
- "id": 1,
286
+ "id": "1",
287
287
  "props": {
288
288
  "backgroundColor": "default",
289
289
  "level": "3",
@@ -295,7 +295,7 @@ exports[`Insert, Update, & Delete Blocks > Insert, update, & delete single block
295
295
  {
296
296
  "children": [],
297
297
  "content": [],
298
- "id": 0,
298
+ "id": "0",
299
299
  "props": {
300
300
  "backgroundColor": "default",
301
301
  "textAlignment": "left",
@@ -311,7 +311,7 @@ exports[`Insert, Update, & Delete Blocks > Insert, update, & delete single block
311
311
  {
312
312
  "children": [],
313
313
  "content": [],
314
- "id": 0,
314
+ "id": "0",
315
315
  "props": {
316
316
  "backgroundColor": "default",
317
317
  "textAlignment": "left",
@@ -327,7 +327,7 @@ exports[`Inserting Blocks with Different Placements > Insert after existing bloc
327
327
  {
328
328
  "children": [],
329
329
  "content": [],
330
- "id": 0,
330
+ "id": "0",
331
331
  "props": {
332
332
  "backgroundColor": "default",
333
333
  "textAlignment": "left",
@@ -346,7 +346,7 @@ exports[`Inserting Blocks with Different Placements > Insert after existing bloc
346
346
  "type": "text",
347
347
  },
348
348
  ],
349
- "id": 2,
349
+ "id": "2",
350
350
  "props": {
351
351
  "backgroundColor": "default",
352
352
  "level": "1",
@@ -363,7 +363,7 @@ exports[`Inserting Blocks with Different Placements > Insert after existing bloc
363
363
  "type": "text",
364
364
  },
365
365
  ],
366
- "id": 1,
366
+ "id": "1",
367
367
  "props": {
368
368
  "backgroundColor": "default",
369
369
  "level": "1",
@@ -383,7 +383,7 @@ exports[`Inserting Blocks with Different Placements > Insert after existing bloc
383
383
  "type": "text",
384
384
  },
385
385
  ],
386
- "id": 4,
386
+ "id": "4",
387
387
  "props": {
388
388
  "backgroundColor": "default",
389
389
  "level": "2",
@@ -400,7 +400,7 @@ exports[`Inserting Blocks with Different Placements > Insert after existing bloc
400
400
  "type": "text",
401
401
  },
402
402
  ],
403
- "id": 3,
403
+ "id": "3",
404
404
  "props": {
405
405
  "backgroundColor": "default",
406
406
  "level": "2",
@@ -412,7 +412,7 @@ exports[`Inserting Blocks with Different Placements > Insert after existing bloc
412
412
  {
413
413
  "children": [],
414
414
  "content": [],
415
- "id": 5,
415
+ "id": "5",
416
416
  "props": {
417
417
  "backgroundColor": "default",
418
418
  "textAlignment": "left",
@@ -436,7 +436,7 @@ exports[`Inserting Blocks with Different Placements > Insert before existing blo
436
436
  "type": "text",
437
437
  },
438
438
  ],
439
- "id": 2,
439
+ "id": "2",
440
440
  "props": {
441
441
  "backgroundColor": "default",
442
442
  "level": "1",
@@ -453,7 +453,7 @@ exports[`Inserting Blocks with Different Placements > Insert before existing blo
453
453
  "type": "text",
454
454
  },
455
455
  ],
456
- "id": 1,
456
+ "id": "1",
457
457
  "props": {
458
458
  "backgroundColor": "default",
459
459
  "level": "1",
@@ -473,7 +473,7 @@ exports[`Inserting Blocks with Different Placements > Insert before existing blo
473
473
  "type": "text",
474
474
  },
475
475
  ],
476
- "id": 4,
476
+ "id": "4",
477
477
  "props": {
478
478
  "backgroundColor": "default",
479
479
  "level": "2",
@@ -490,7 +490,7 @@ exports[`Inserting Blocks with Different Placements > Insert before existing blo
490
490
  "type": "text",
491
491
  },
492
492
  ],
493
- "id": 3,
493
+ "id": "3",
494
494
  "props": {
495
495
  "backgroundColor": "default",
496
496
  "level": "2",
@@ -502,7 +502,7 @@ exports[`Inserting Blocks with Different Placements > Insert before existing blo
502
502
  {
503
503
  "children": [],
504
504
  "content": [],
505
- "id": 0,
505
+ "id": "0",
506
506
  "props": {
507
507
  "backgroundColor": "default",
508
508
  "textAlignment": "left",
@@ -528,7 +528,7 @@ exports[`Inserting Blocks with Different Placements > Insert nested inside exist
528
528
  "type": "text",
529
529
  },
530
530
  ],
531
- "id": 2,
531
+ "id": "2",
532
532
  "props": {
533
533
  "backgroundColor": "default",
534
534
  "level": "1",
@@ -545,7 +545,7 @@ exports[`Inserting Blocks with Different Placements > Insert nested inside exist
545
545
  "type": "text",
546
546
  },
547
547
  ],
548
- "id": 1,
548
+ "id": "1",
549
549
  "props": {
550
550
  "backgroundColor": "default",
551
551
  "level": "1",
@@ -565,7 +565,7 @@ exports[`Inserting Blocks with Different Placements > Insert nested inside exist
565
565
  "type": "text",
566
566
  },
567
567
  ],
568
- "id": 4,
568
+ "id": "4",
569
569
  "props": {
570
570
  "backgroundColor": "default",
571
571
  "level": "2",
@@ -582,7 +582,7 @@ exports[`Inserting Blocks with Different Placements > Insert nested inside exist
582
582
  "type": "text",
583
583
  },
584
584
  ],
585
- "id": 3,
585
+ "id": "3",
586
586
  "props": {
587
587
  "backgroundColor": "default",
588
588
  "level": "2",
@@ -593,7 +593,7 @@ exports[`Inserting Blocks with Different Placements > Insert nested inside exist
593
593
  },
594
594
  ],
595
595
  "content": [],
596
- "id": 0,
596
+ "id": "0",
597
597
  "props": {
598
598
  "backgroundColor": "default",
599
599
  "textAlignment": "left",
@@ -604,7 +604,7 @@ exports[`Inserting Blocks with Different Placements > Insert nested inside exist
604
604
  {
605
605
  "children": [],
606
606
  "content": [],
607
- "id": 5,
607
+ "id": "5",
608
608
  "props": {
609
609
  "backgroundColor": "default",
610
610
  "textAlignment": "left",