File tree 12 files changed +34
-20
lines changed
packages/server-util/src/context/__snapshots__
clipboard/copy/__snapshots__/text/html
formatConversion/export/__snapshots__/html
react/formatConversion/export/__snapshots__/html
12 files changed +34
-20
lines changed Original file line number Diff line number Diff line change 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"><div class="bn-block" data-node-type="blockContainer" data-id="1"><div class="bn-block-content" data-content-type="heading" data-text-color="yellow" data-background-color="blue" 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"><div class="bn-block" data-node-type="blockContainer" data-id="2"><div class="bn-block-content" data-content-type="paragraph" data-background-color="red"><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 style = " background-color: blue; color: yellow; text-align: right; " data-level = " 2" ><strong ><u >Heading </u ></strong ><em ><s >2</s ></em ></h2 ><p style = " 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 >"`;
6
6
7
7
exports[`Test ServerBlockNoteEditor > converts to and from HTML (blocksToHTMLLossy) 2`] = `
8
8
[
Original file line number Diff line number Diff line change 1
- < p data-text-color =" red "> Paragraph 1</ p >
1
+ < p style =" color: red; "> Paragraph 1</ p >
2
2
< h2 data-level ="2 "> Heading 1</ h2 >
3
3
< ol start ="2 ">
4
4
< li data-start ="2 ">
5
5
< p > Numbered List Item 1</ p >
6
6
</ li >
7
7
</ ol >
8
8
< ul >
9
- < li data- background-color=" red ">
9
+ < li style =" background-color: red; ">
10
10
< p > Bullet List Item 1</ p >
11
11
</ li >
12
12
< li data-checked ="true ">
Original file line number Diff line number Diff line change 1
- < h2 data-text-color =" yellow " data- background-color=" blue " data- text-alignment =" right " data-level ="2 ">
1
+ < h2 style =" background-color: blue; color: yellow; text-align: right; " data-level ="2 ">
2
2
< strong >
3
3
< u > Heading</ u >
4
4
</ strong >
5
5
< em >
6
6
< s > 2</ s >
7
7
</ em >
8
8
</ h2 >
9
- < p data- background-color=" red "> Paragraph</ p >
9
+ < p style =" background-color: red; "> Paragraph</ p >
10
10
< ul >
11
11
< li >
12
12
< p > </ p >
Original file line number Diff line number Diff line change 1
- < p
2
- data-text-color ="orange "
3
- data-background-color ="pink "
4
- data-text-alignment ="center "
5
- >
1
+ < p style ="background-color: pink; color: orange; text-align: center; ">
6
2
Plain
7
3
< span data-text-color ="red "> Red Text</ span >
8
4
< span data-background-color ="blue "> Blue Background</ span >
Original file line number Diff line number Diff line change 1
- < div data-editable =""> React Context Paragraph</ div >
1
+ < div data-editable ="" style =" white-space: normal; " > React Context Paragraph</ div >
Original file line number Diff line number Diff line change 1
- < p class ="react-custom-paragraph "> Hello World</ p >
1
+ < p class ="react-custom-paragraph " style =" white-space: normal; " > Hello World</ p >
Original file line number Diff line number Diff line change 1
- < p class ="react-custom-paragraph "> Hello World</ p >
1
+ < p class ="react-custom-paragraph " style =" white-space: normal; " > Hello World</ p >
Original file line number Diff line number Diff line change 1
- < p class ="react-custom-paragraph "> Hello World</ p >
2
- < p class ="react-custom-paragraph "> Hello World</ p >
3
- < p class ="react-custom-paragraph "> Hello World</ p >
1
+ < p class ="react-custom-paragraph " style =" white-space: normal; " > Hello World</ p >
2
+ < p class ="react-custom-paragraph " style =" white-space: normal; " > Hello World</ p >
3
+ < p class ="react-custom-paragraph " style =" white-space: normal; " > Hello World</ p >
Original file line number Diff line number Diff line change 1
1
< p
2
2
class ="react-custom-paragraph "
3
+ style ="white-space: normal; "
3
4
data-text-alignment ="center "
4
5
data-text-color ="orange "
5
6
data-background-color ="pink "
Original file line number Diff line number Diff line change 1
- < p class ="simple-react-custom-paragraph " data-editable =""> React Custom Paragraph</ p >
1
+ < p
2
+ class ="simple-react-custom-paragraph "
3
+ data-editable =""
4
+ style ="white-space: normal; "
5
+ > React Custom Paragraph</ p >
Original file line number Diff line number Diff line change 1
- < p class ="simple-react-custom-paragraph " data-editable =""> Custom React Paragraph</ p >
2
- < p class ="simple-react-custom-paragraph " data-editable =""> Nested React Custom Paragraph 1</ p >
3
- < p class ="simple-react-custom-paragraph " data-editable =""> Nested React Custom Paragraph 2</ p >
1
+ < p
2
+ class ="simple-react-custom-paragraph "
3
+ data-editable =""
4
+ style ="white-space: normal; "
5
+ > Custom React Paragraph</ p >
6
+ < p
7
+ class ="simple-react-custom-paragraph "
8
+ data-editable =""
9
+ style ="white-space: normal; "
10
+ > Nested React Custom Paragraph 1</ p >
11
+ < p
12
+ class ="simple-react-custom-paragraph "
13
+ data-editable =""
14
+ style ="white-space: normal; "
15
+ > Nested React Custom Paragraph 2</ p >
Original file line number Diff line number Diff line change 1
1
< p
2
2
class ="simple-react-custom-paragraph "
3
3
data-editable =""
4
+ style ="white-space: normal; "
4
5
data-text-alignment ="center "
5
6
data-text-color ="orange "
6
7
data-background-color ="pink "
You can’t perform that action at this time.
0 commit comments