diff --git a/examples/05-interoperability/01-converting-blocks-to-html/src/App.tsx b/examples/05-interoperability/01-converting-blocks-to-html/src/App.tsx
index 70e8f24ca9..f05df619d6 100644
--- a/examples/05-interoperability/01-converting-blocks-to-html/src/App.tsx
+++ b/examples/05-interoperability/01-converting-blocks-to-html/src/App.tsx
@@ -41,18 +41,22 @@ export default function App() {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
- // Renders the editor instance, and its contents as HTML below.
+ // Renders the editor instance and HTML output.
return (
-
);
}
diff --git a/examples/05-interoperability/08-converting-blocks-to-react-email/src/styles.css b/examples/05-interoperability/08-converting-blocks-to-react-email/src/styles.css
index 1ccbb9d746..a40fba5104 100644
--- a/examples/05-interoperability/08-converting-blocks-to-react-email/src/styles.css
+++ b/examples/05-interoperability/08-converting-blocks-to-react-email/src/styles.css
@@ -1,36 +1,63 @@
-.wrapper {
+.views {
+ container-name: views;
+ container-type: inline-size;
display: flex;
flex-direction: row;
+ flex-wrap: wrap;
+ gap: 8px;
height: 100%;
+ padding: 8px;
}
-@media (max-width: 800px) {
- .wrapper {
- flex-direction: column;
- }
+.view-wrapper {
+ display: flex;
+ flex-direction: column;
+ height: calc(50% - 4px);
+ width: 100%;
+}
- .editor {
- max-height: 500px;
- overflow-y: scroll;
+@container views (width > 1024px) {
+ .view-wrapper {
+ height: 100%;
+ width: calc(50% - 4px);
}
}
-.wrapper > div {
+.view-label {
+ color: #0090ff;
+ display: flex;
+ font-size: 12px;
+ font-weight: bold;
+ justify-content: space-between;
+ margin-inline: 16px;
+}
+
+.view-label-download {
+ cursor: pointer;
+ text-decoration: underline;
+}
+
+.view {
+ border: solid #0090ff 1px;
+ border-radius: 16px;
flex: 1;
+ height: 0;
+ padding: 8px;
}
-.email {
- min-height: 500px;
+.view .bn-container {
+ height: 100%;
+ margin: 0;
+ max-width: none;
+ padding: 0;
}
-/* hack to get react-email to show on website */
-@tailwind base;
-@layer base {
- .email [hidden]:where(:not([hidden="until-found"])) {
- display: block !important;
- }
+.view .bn-editor {
+ height: 100%;
+ overflow: auto;
}
-.editor.bordered {
- border: 1px solid gray;
+.view .email {
+ height: 100%;
+ overflow: auto;
}
diff --git a/playground/src/examples.gen.tsx b/playground/src/examples.gen.tsx
index 131ade6a07..49ef038167 100644
--- a/playground/src/examples.gen.tsx
+++ b/playground/src/examples.gen.tsx
@@ -1045,7 +1045,7 @@
"pathFromRoot": "examples/05-interoperability",
"slug": "interoperability"
},
- "readme": "This example exports the current document (all blocks) as an PDF file and downloads it to your computer.\n\n**Try it out:** Edit the document and click \"Download .pdf\" in top-left corner, to download the PDF file."
+ "readme": "This example exports the current document (all blocks) as an PDF file and downloads it to your computer.\n\n**Try it out:** Edit the document and click \"Download .pdf\" at the top to download the PDF file."
},
{
"projectSlug": "converting-blocks-to-docx",
@@ -1065,12 +1065,12 @@
} as any,
"pro": true
},
- "title": "Exporting documents to .docx (Office Open XML)",
+ "title": "Exporting documents to DOCX (Office Open XML)",
"group": {
"pathFromRoot": "examples/05-interoperability",
"slug": "interoperability"
},
- "readme": "This example exports the current document (all blocks) as an Microsoft Word Document (DOCX) file and downloads it to your computer.\n\n**Try it out:** Edit the document and click \"Download .docx\" in top-left corner, to download the DOCX file."
+ "readme": "This example exports the current document (all blocks) as an Microsoft Word Document (DOCX) file and downloads it to your computer.\n\n**Try it out:** Edit the document and click \"Download .docx\" at the top to download the DOCX file."
},
{
"projectSlug": "converting-blocks-to-odt",
@@ -1089,12 +1089,12 @@
} as any,
"pro": true
},
- "title": "Exporting documents to .odt (Open Document Text)",
+ "title": "Exporting documents to ODT (Open Document Text)",
"group": {
"pathFromRoot": "examples/05-interoperability",
"slug": "interoperability"
},
- "readme": "This example exports the current document (all blocks) as an Open Document Text (ODT) file and downloads it to your computer.\n\n**Try it out:** Edit the document and click \"Download .odt\" in top-left corner, to download the ODT file."
+ "readme": "This example exports the current document (all blocks) as an Open Document Text (ODT) file and downloads it to your computer.\n\n**Try it out:** Edit the document and click \"Download .odt\" at the top to download the ODT file."
},
{
"projectSlug": "converting-blocks-to-react-email",
@@ -1113,12 +1113,12 @@
} as any,
"pro": true
},
- "title": "Exporting documents to React Email",
+ "title": "Exporting documents to Email (HTML)",
"group": {
"pathFromRoot": "examples/05-interoperability",
"slug": "interoperability"
},
- "readme": "This example exports the current document (all blocks) as a React Email document.\n\n**Try it out:** Edit the document and the preview will update."
+ "readme": "This example exports the current document (all blocks) as an HTML file for use in emails, and downloads it to your computer.\n\n**Try it out:** Edit the document and click \"Download email .html\" at the top to download the HTML file."
}
]
},
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index b7d7c26e08..b248fe29ee 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -23107,7 +23107,7 @@ snapshots:
jest-worker@27.5.1:
dependencies:
- '@types/node': 22.15.2
+ '@types/node': 20.17.50
merge-stream: 2.0.0
supports-color: 8.1.1