2
2
3
3
exports[`Test ServerBlockNoteEditor > converts to HTML (blocksToFullHTML) 1`] = `"<div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="1" data-text-color="yellow" data-background-color="blue"><div class="bn-block" data-node-type="blockContainer" data-id="1" data-text-color="yellow" data-background-color="blue"><div class="bn-block-content" data-content-type="heading" data-text-alignment="right" data-level="2"><h2 class="bn-inline-content"><strong><u>Heading </u></strong><em><s>2</s></em></h2></div><div class="bn-block-group" data-node-type="blockGroup"><div class="bn-block-outer" data-node-type="blockOuter" data-id="2" data-background-color="red"><div class="bn-block" data-node-type="blockContainer" data-id="2" data-background-color="red"><div class="bn-block-content" data-content-type="paragraph"><p class="bn-inline-content">Paragraph</p></div></div></div><div class="bn-block-outer" data-node-type="blockOuter" data-id="3"><div class="bn-block" data-node-type="blockContainer" data-id="3"><div class="bn-block-content" data-content-type="bulletListItem"><p class="bn-inline-content">list item</p></div></div></div></div></div></div><div class="bn-block-outer" data-node-type="blockOuter" data-id="4"><div class="bn-block" data-node-type="blockContainer" data-id="4"><div class="bn-block-content" data-content-type="image" data-name="Example" data-url="exampleURL" data-caption="Caption" data-preview-width="256" data-file-block=""><div class="bn-file-block-content-wrapper" style="width: 256px;"><div class="bn-visual-media-wrapper"><img class="bn-visual-media" src="exampleURL" alt="Example" draggable="false"></div><p class="bn-file-caption">Caption</p></div></div></div></div><div class="bn-block-outer" data-node-type="blockOuter" data-id="5"><div class="bn-block" data-node-type="blockContainer" data-id="5"><div class="bn-block-content" data-content-type="image" data-name="Example" data-url="exampleURL" data-caption="Caption" data-show-preview="false" data-preview-width="256" data-file-block=""><div class="bn-file-block-content-wrapper"><div class="bn-file-name-with-icon"><div class="bn-file-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg></div><p class="bn-file-name">Example</p></div><p class="bn-file-caption">Caption</p></div></div></div></div></div>"`;
4
4
5
- exports [` Test ServerBlockNoteEditor > converts to and from HTML (blocksToHTMLLossy) 1` ] = ` "<h2 data-text-color = " yellow" data-background-color = " blue" data-text-alignment = " right" data-level = " 2" ><strong ><u >Heading </u ></strong ><em ><s >2</s ></em ></h2 ><p data-background-color = " red" >Paragraph</p ><ul ><li ><p >list item</p ></li ></ul ><figure data-name = " Example" data-url = " exampleURL" data-caption = " Caption" data-preview-width = " 256" ><img src = " exampleURL" alt = " Example" width = " 256" ><figcaption >Caption</figcaption ></figure ><div data-name = " Example" data-url = " exampleURL" data-caption = " Caption" data-show-preview = " false" data-preview-width = " 256" ><a href = " exampleURL" >Example</a ><p >Caption</p ></div >"`;
5
+ exports[`Test ServerBlockNoteEditor > converts to and from HTML (blocksToHTMLLossy) 1`] = `"<h2 class="bn-block-content" data-node-type="blockOuter" data-id="1" data-text-color="yellow" data-background-color="blue" data-content-type="heading" data-text-alignment="right" data-level="2"><strong><u>Heading </u></strong><em><s>2</s></em></h2><p class="bn-block-content" data-node-type="blockOuter" data-id="2" data-background-color="red" data-content-type="paragraph">Paragraph</p><ul><li class="bn-block-content" data-node-type="blockOuter" data-id="3" data-content-type="bulletListItem"><p class="bn-inline-content">list item</p></li></ul><figure class="bn-block-content" data-node-type="blockOuter" data-id="4" data-content-type="image" data-name="Example" data-url="exampleURL" data-caption="Caption" data-preview-width="256" data-file-block=""><img src="exampleURL" alt="Example" width="256"><figcaption>Caption</figcaption></figure><div class="bn-block-content" data-node-type="blockOuter" data-id="5" data-content-type="image" data-name="Example" data-url="exampleURL" data-caption="Caption" data-show-preview="false" data-preview-width="256" data-file-block=""><a href="exampleURL">Example</a><p>Caption</p></div>"`;
6
6
7
7
exports [` Test ServerBlockNoteEditor > converts to and from HTML (blocksToHTMLLossy) 2` ] = `
8
8
[
@@ -26,12 +26,12 @@ exports[`Test ServerBlockNoteEditor > converts to and from HTML (blocksToHTMLLos
26
26
" type" : " text" ,
27
27
},
28
28
],
29
- " id" : " 0 " ,
29
+ " id" : " 1 " ,
30
30
" props" : {
31
- " backgroundColor" : " default " ,
31
+ " backgroundColor" : " blue " ,
32
32
" level" : 2 ,
33
33
" textAlignment" : " right" ,
34
- " textColor" : " default " ,
34
+ " textColor" : " yellow " ,
35
35
},
36
36
" type" : " heading" ,
37
37
} ,
@@ -44,9 +44,9 @@ exports[`Test ServerBlockNoteEditor > converts to and from HTML (blocksToHTMLLos
44
44
" type" : " text" ,
45
45
},
46
46
],
47
- " id" : " 1 " ,
47
+ " id" : " 2 " ,
48
48
" props" : {
49
- " backgroundColor" : " default " ,
49
+ " backgroundColor" : " red " ,
50
50
" textAlignment" : " left" ,
51
51
" textColor" : " default" ,
52
52
},
@@ -61,7 +61,7 @@ exports[`Test ServerBlockNoteEditor > converts to and from HTML (blocksToHTMLLos
61
61
" type" : " text" ,
62
62
},
63
63
],
64
- " id" : " 2 " ,
64
+ " id" : " 3 " ,
65
65
" props" : {
66
66
" backgroundColor" : " default" ,
67
67
" textAlignment" : " left" ,
@@ -72,7 +72,7 @@ exports[`Test ServerBlockNoteEditor > converts to and from HTML (blocksToHTMLLos
72
72
{
73
73
" children" : [],
74
74
" content" : undefined ,
75
- " id" : " 3 " ,
75
+ " id" : " 4 " ,
76
76
" props" : {
77
77
" backgroundColor" : " default" ,
78
78
" caption" : " Caption" ,
@@ -86,43 +86,18 @@ exports[`Test ServerBlockNoteEditor > converts to and from HTML (blocksToHTMLLos
86
86
} ,
87
87
{
88
88
" children" : [],
89
- " content" : [
90
- {
91
- " content" : [
92
- {
93
- " styles" : {},
94
- " text" : " Example" ,
95
- " type" : " text" ,
96
- },
97
- ],
98
- " href" : " exampleURL" ,
99
- " type" : " link" ,
100
- },
101
- ],
102
- " id" : " 4" ,
103
- " props" : {
104
- " backgroundColor" : " default" ,
105
- " textAlignment" : " left" ,
106
- " textColor" : " default" ,
107
- },
108
- " type" : " paragraph" ,
109
- } ,
110
- {
111
- " children" : [],
112
- " content" : [
113
- {
114
- " styles" : {},
115
- " text" : " Caption" ,
116
- " type" : " text" ,
117
- },
118
- ],
89
+ " content" : undefined ,
119
90
" id" : " 5" ,
120
91
" props" : {
121
92
" backgroundColor" : " default" ,
93
+ " caption" : " Caption" ,
94
+ " name" : " Example" ,
95
+ " previewWidth" : 256 ,
96
+ " showPreview" : false ,
122
97
" textAlignment" : " left" ,
123
- " textColor " : " default " ,
98
+ " url " : " exampleURL " ,
124
99
},
125
- " type" : " paragraph " ,
100
+ " type" : " image " ,
126
101
} ,
127
102
]
128
103
` ;
0 commit comments