22
33exports[`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>"`;
44
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>"`;
66
77exports [` Test ServerBlockNoteEditor > converts to and from HTML (blocksToHTMLLossy) 2` ] = `
88[
@@ -26,12 +26,12 @@ exports[`Test ServerBlockNoteEditor > converts to and from HTML (blocksToHTMLLos
2626 " type" : " text" ,
2727 },
2828 ],
29- " id" : " 0 " ,
29+ " id" : " 1 " ,
3030 " props" : {
31- " backgroundColor" : " default " ,
31+ " backgroundColor" : " blue " ,
3232 " level" : 2 ,
3333 " textAlignment" : " right" ,
34- " textColor" : " default " ,
34+ " textColor" : " yellow " ,
3535 },
3636 " type" : " heading" ,
3737 } ,
@@ -44,9 +44,9 @@ exports[`Test ServerBlockNoteEditor > converts to and from HTML (blocksToHTMLLos
4444 " type" : " text" ,
4545 },
4646 ],
47- " id" : " 1 " ,
47+ " id" : " 2 " ,
4848 " props" : {
49- " backgroundColor" : " default " ,
49+ " backgroundColor" : " red " ,
5050 " textAlignment" : " left" ,
5151 " textColor" : " default" ,
5252 },
@@ -61,7 +61,7 @@ exports[`Test ServerBlockNoteEditor > converts to and from HTML (blocksToHTMLLos
6161 " type" : " text" ,
6262 },
6363 ],
64- " id" : " 2 " ,
64+ " id" : " 3 " ,
6565 " props" : {
6666 " backgroundColor" : " default" ,
6767 " textAlignment" : " left" ,
@@ -72,7 +72,7 @@ exports[`Test ServerBlockNoteEditor > converts to and from HTML (blocksToHTMLLos
7272 {
7373 " children" : [],
7474 " content" : undefined ,
75- " id" : " 3 " ,
75+ " id" : " 4 " ,
7676 " props" : {
7777 " backgroundColor" : " default" ,
7878 " caption" : " Caption" ,
@@ -86,43 +86,18 @@ exports[`Test ServerBlockNoteEditor > converts to and from HTML (blocksToHTMLLos
8686 } ,
8787 {
8888 " 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 ,
11990 " id" : " 5" ,
12091 " props" : {
12192 " backgroundColor" : " default" ,
93+ " caption" : " Caption" ,
94+ " name" : " Example" ,
95+ " previewWidth" : 256 ,
96+ " showPreview" : false ,
12297 " textAlignment" : " left" ,
123- " textColor " : " default " ,
98+ " url " : " exampleURL " ,
12499 },
125- " type" : " paragraph " ,
100+ " type" : " image " ,
126101 } ,
127102]
128103` ;
0 commit comments