diff --git a/examples/01-basic/19-kitchen-sink/.bnexample.json b/examples/01-basic/19-kitchen-sink/.bnexample.json
new file mode 100644
index 0000000000..fc6a0c1541
--- /dev/null
+++ b/examples/01-basic/19-kitchen-sink/.bnexample.json
@@ -0,0 +1,22 @@
+{
+ "playground": true,
+ "docs": false,
+ "author": "BlockNote",
+ "tags": ["Testing", "Collaboration"],
+ "pro": true,
+ "dependencies": {
+ "@blocknote/code-block": "latest",
+ "@blocknote/math-block": "latest",
+ "@blocknote/diagram-block": "latest",
+ "@blocknote/xl-multi-column": "latest",
+ "@blocknote/xl-pdf-exporter": "latest",
+ "@blocknote/xl-typst-compiler": "latest",
+ "@y/prosemirror": "^2.0.0-15",
+ "@y/protocols": "^1.0.6-rc.1",
+ "@y/websocket": "^4.0.0-3",
+ "@y/y": "^14.0.0-rc.26"
+ },
+ "devDependencies": {
+ "typescript": "^7.0.2"
+ }
+}
diff --git a/examples/01-basic/19-kitchen-sink/README.md b/examples/01-basic/19-kitchen-sink/README.md
new file mode 100644
index 0000000000..a922b3a64e
--- /dev/null
+++ b/examples/01-basic/19-kitchen-sink/README.md
@@ -0,0 +1,4 @@
+# Kitchen sink
+
+This example brings together BlockNote's blocks, text markup, math, diagrams, tables, and columns for manual testing.
+Use the sidebar to switch documents, change appearance, download PDFs, or open the same room URL in another browser or device to try collaborative editing and floating comments through YHub.
diff --git a/examples/01-basic/19-kitchen-sink/index.html b/examples/01-basic/19-kitchen-sink/index.html
new file mode 100644
index 0000000000..b5e93d70ac
--- /dev/null
+++ b/examples/01-basic/19-kitchen-sink/index.html
@@ -0,0 +1,17 @@
+
+
+
+
+ Kitchen sink
+
+
+
+
+
+
+
diff --git a/examples/01-basic/19-kitchen-sink/main.tsx b/examples/01-basic/19-kitchen-sink/main.tsx
new file mode 100644
index 0000000000..1260513388
--- /dev/null
+++ b/examples/01-basic/19-kitchen-sink/main.tsx
@@ -0,0 +1,11 @@
+// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
+import React from "react";
+import { createRoot } from "react-dom/client";
+import App from "./src/App.jsx";
+
+const root = createRoot(document.getElementById("root")!);
+root.render(
+
+
+ ,
+);
diff --git a/examples/01-basic/19-kitchen-sink/package.json b/examples/01-basic/19-kitchen-sink/package.json
new file mode 100644
index 0000000000..1eed6edd77
--- /dev/null
+++ b/examples/01-basic/19-kitchen-sink/package.json
@@ -0,0 +1,39 @@
+{
+ "name": "@blocknote/example-basic-kitchen-sink",
+ "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY",
+ "type": "module",
+ "private": true,
+ "version": "0.12.4",
+ "scripts": {
+ "start": "vite",
+ "dev": "vite",
+ "build:prod": "tsc && vite build",
+ "preview": "vite preview"
+ },
+ "dependencies": {
+ "@blocknote/core": "latest",
+ "@blocknote/mantine": "latest",
+ "@blocknote/react": "latest",
+ "@mantine/core": "^9.0.2",
+ "@mantine/hooks": "^9.0.2",
+ "react": "^19.2.3",
+ "react-dom": "^19.2.3",
+ "@blocknote/code-block": "latest",
+ "@blocknote/math-block": "latest",
+ "@blocknote/diagram-block": "latest",
+ "@blocknote/xl-multi-column": "latest",
+ "@blocknote/xl-pdf-exporter": "latest",
+ "@blocknote/xl-typst-compiler": "latest",
+ "@y/prosemirror": "^2.0.0-15",
+ "@y/protocols": "^1.0.6-rc.1",
+ "@y/websocket": "^4.0.0-3",
+ "@y/y": "^14.0.0-rc.26"
+ },
+ "devDependencies": {
+ "@types/react": "^19.2.3",
+ "@types/react-dom": "^19.2.3",
+ "@vitejs/plugin-react": "^6.0.1",
+ "vite": "^8.0.0",
+ "typescript": "^7.0.2"
+ }
+}
diff --git a/examples/01-basic/19-kitchen-sink/src/App.tsx b/examples/01-basic/19-kitchen-sink/src/App.tsx
new file mode 100644
index 0000000000..ea1435a7f3
--- /dev/null
+++ b/examples/01-basic/19-kitchen-sink/src/App.tsx
@@ -0,0 +1,333 @@
+import { combineByGroup, createUserStore } from "@blocknote/core";
+import {
+ CommentsExtension,
+ DefaultThreadStoreAuth,
+} from "@blocknote/core/comments";
+import { withCollaboration, YjsThreadStore } from "@blocknote/core/y";
+import {
+ filterSuggestionItems,
+ LoadingExtension,
+} from "@blocknote/core/extensions";
+import {
+ getMathBlockTypeSelectItems,
+ getMathSlashMenuItems,
+ locales as mathLocales,
+} from "@blocknote/math-block";
+import {
+ getDiagramBlockTypeSelectItems,
+ getDiagramSlashMenuItems,
+ locales as diagramLocales,
+} from "@blocknote/diagram-block";
+import {
+ getMultiColumnSlashMenuItems,
+ multiColumnDropCursor,
+ locales as columnLocales,
+} from "@blocknote/xl-multi-column";
+import { en } from "@blocknote/core/locales";
+import { syntaxHighlighter } from "@blocknote/code-block";
+import { BlockNoteView } from "@blocknote/mantine";
+import {
+ useCreateBlockNote,
+ useExtensionState,
+ SuggestionMenuController,
+ getDefaultReactSlashMenuItems,
+ getPageBreakReactSlashMenuItems,
+ FormattingToolbar,
+ FormattingToolbarController,
+ blockTypeSelectItems,
+} from "@blocknote/react";
+import { useEffect, useMemo, useState } from "react";
+import "@blocknote/core/fonts/inter.css";
+import "@blocknote/mantine/style.css";
+import "@blocknote/math-block/style.css";
+import { schema } from "./schema.js";
+import { presets, standardBlocks } from "./documents/index.js";
+import { createSession } from "./session.js";
+import { PdfDownload } from "./PdfDownload.js";
+import { Shortcuts } from "./Shortcuts.js";
+import "./style.css";
+
+// Store uploads in the shared document as data URLs; no upload server is needed.
+async function uploadFile(file: File): Promise {
+ return new Promise((resolve, reject) => {
+ const reader = new FileReader();
+
+ reader.onload = () => {
+ if (typeof reader.result !== "string") {
+ throw new Error("Expected a data URL");
+ }
+
+ resolve(reader.result);
+ };
+
+ reader.onerror = () => reject(reader.error);
+ reader.readAsDataURL(file);
+ });
+}
+
+// Like the YHub example, keep one document and user identity for this page.
+const session = createSession();
+
+export default function App() {
+ const [editable, setEditable] = useState(true);
+ const [dark, setDark] = useState(false);
+
+ const settings = session.doc.get("settings");
+ const [preset, setPreset] = useState(
+ () =>
+ presets.find((entry) => entry.id === settings.getAttr("preset"))?.id ??
+ "standard",
+ );
+
+ useEffect(() => {
+ function update() {
+ setPreset(
+ presets.find((entry) => entry.id === settings.getAttr("preset"))?.id ??
+ "standard",
+ );
+ }
+
+ settings.observe(update);
+
+ return () => settings.unobserve(update);
+ }, [settings]);
+
+ // Share comment threads through Yjs and resolve the same users for comments and cursors.
+ const { threadStore, userStore } = useMemo(
+ () => ({
+ threadStore: new YjsThreadStore(
+ session.user.id,
+ session.doc.get("threads"),
+ new DefaultThreadStoreAuth(session.user.id, "editor"),
+ ),
+ userStore: createUserStore(async (ids) =>
+ ids.map((id) => ({
+ id,
+ username: `User ${id.slice(0, 4)}`,
+ avatarUrl: "",
+ })),
+ ),
+ }),
+ [],
+ );
+
+ const editor = useCreateBlockNote(
+ withCollaboration({
+ schema,
+ uploadFile,
+ dropCursor: multiColumnDropCursor,
+ dictionary: {
+ ...en,
+ math: mathLocales.en,
+ diagram: diagramLocales.en,
+ multi_column: columnLocales.en,
+ },
+ tables: {
+ splitCells: true,
+ cellBackgroundColor: true,
+ cellTextColor: true,
+ headers: true,
+ },
+ extensions: [
+ syntaxHighlighter,
+ CommentsExtension({ threadStore, resolveUsers: userStore }),
+ ],
+ collaboration: {
+ provider: session.provider,
+ fragment: session.doc.get("bn"),
+ user: session.user,
+ resolveUsers: userStore,
+ },
+ }),
+ [threadStore, userStore],
+ );
+ const loading = useExtensionState(LoadingExtension, {
+ editor,
+ selector: (state) => state.size > 0,
+ });
+
+ useEffect(() => {
+ function initialize(synced: boolean) {
+ // Seed an untouched room only after the server has sent its state.
+ if (
+ synced &&
+ session.doc.get("bn").length === 0 &&
+ !settings.hasAttr("preset")
+ ) {
+ session.doc.transact(() => {
+ editor.replaceBlocks(editor.document, standardBlocks);
+ settings.setAttr("preset", "standard");
+ });
+ }
+ }
+
+ session.provider.on("sync", initialize);
+ session.provider.connect();
+ initialize(session.provider.synced);
+
+ return () => {
+ session.provider.off("sync", initialize);
+ session.provider.disconnect();
+ };
+ }, [editor, settings]);
+
+ return (
+
+
+
+
+
+
+ Document editor
+
+ {editable ? "Editable" : "Read only"}
+
+
+ {loading && (
+
+ Loading shared document…
+
+ )}
+
+
+ (
+
+ )}
+ />
+
+ filterSuggestionItems(
+ combineByGroup(
+ getDefaultReactSlashMenuItems(editor),
+ getPageBreakReactSlashMenuItems(editor),
+ getMultiColumnSlashMenuItems(editor),
+ getMathSlashMenuItems(editor),
+ getDiagramSlashMenuItems(editor),
+ ),
+ query,
+ )
+ }
+ />
+
+
+
+
+
+
+ );
+}
diff --git a/examples/01-basic/19-kitchen-sink/src/PdfDownload.tsx b/examples/01-basic/19-kitchen-sink/src/PdfDownload.tsx
new file mode 100644
index 0000000000..ddf47889c5
--- /dev/null
+++ b/examples/01-basic/19-kitchen-sink/src/PdfDownload.tsx
@@ -0,0 +1,102 @@
+import { useEffect, useRef, useState } from "react";
+import {
+ PDFExporter,
+ typstDefaultSchemaMappings,
+} from "@blocknote/xl-pdf-exporter";
+import compilerWasmUrl from "@blocknote/xl-typst-compiler/wasm?url";
+import { diagramBlockMapping } from "@blocknote/diagram-block/typst-exporter";
+import {
+ inlineMathMapping,
+ mathBlockMapping,
+} from "@blocknote/math-block/typst-exporter";
+import type { KitchenSinkEditor } from "./schema.js";
+
+export function PdfDownload({
+ editor,
+ disabled,
+}: {
+ editor: KitchenSinkEditor;
+ disabled: boolean;
+}) {
+ const [status, setStatus] = useState<"idle" | "loading" | "error">("idle");
+ const requestId = useRef(0);
+
+ useEffect(
+ () => () => {
+ requestId.current++;
+ },
+ [],
+ );
+
+ async function downloadPdf() {
+ const request = ++requestId.current;
+ setStatus("loading");
+
+ // Each click exports a snapshot with a fresh asset registry.
+ try {
+ const exporter = new PDFExporter(
+ editor.schema,
+ {
+ ...typstDefaultSchemaMappings,
+ blockMapping: {
+ ...typstDefaultSchemaMappings.blockMapping,
+ mathBlock: mathBlockMapping,
+ diagram: diagramBlockMapping,
+ },
+ inlineContentMapping: {
+ ...typstDefaultSchemaMappings.inlineContentMapping,
+ math: inlineMathMapping,
+ },
+ },
+ { wasm: compilerWasmUrl },
+ );
+
+ const result = await exporter.toPDF(editor.document, {
+ title: "Kitchen sink",
+ lang: "en",
+ });
+
+ if (request !== requestId.current) {
+ return;
+ }
+
+ if (result.error) {
+ setStatus("error");
+ return;
+ }
+
+ const link = document.createElement("a");
+ link.href = URL.createObjectURL(result.blob);
+ link.download = "kitchen-sink.pdf";
+ document.body.appendChild(link);
+ link.click();
+ link.remove();
+ URL.revokeObjectURL(link.href);
+ } finally {
+ // Unexpected failures still propagate, but must not leave the button disabled.
+ if (request === requestId.current) {
+ setStatus((current) => (current === "loading" ? "idle" : current));
+ }
+ }
+ }
+
+ return (
+ <>
+
+ {status === "error" && (
+
+ There was an error converting this document to PDF.
+
+ )}
+ >
+ );
+}
diff --git a/examples/01-basic/19-kitchen-sink/src/Shortcuts.tsx b/examples/01-basic/19-kitchen-sink/src/Shortcuts.tsx
new file mode 100644
index 0000000000..d085dfef0a
--- /dev/null
+++ b/examples/01-basic/19-kitchen-sink/src/Shortcuts.tsx
@@ -0,0 +1,81 @@
+const shortcuts = [
+ ["Paragraph", "Mod+Alt+0", ""],
+ ["Heading 1–6", "Mod+Alt+1–6", "# , ## , ### , … at block start"],
+ ["Quote", "Mod+Alt+Q", "> at block start, followed by Space"],
+ [
+ "Bulleted list",
+ "Mod+Shift+8",
+ "- , + , or * at block start, followed by Space",
+ ],
+ [
+ "Numbered list",
+ "Mod+Shift+7",
+ "1. , 2. , … at block start, followed by Space",
+ ],
+ [
+ "Checklist",
+ "Mod+Shift+9",
+ "[] , [ ] , [x] , or [X] at block start, followed by Space",
+ ],
+ ["Toggle list", "Mod+Shift+6", ""],
+ ["Code block", "Mod+Alt+C", "``` or ```js at block start, followed by Space"],
+ ["Math equation", "", "$$ or \\[ at block start, followed by Space"],
+ ["Bold", "Mod+B", "**text** or __text__"],
+ ["Italic", "Mod+I", "*text* or _text_"],
+ ["Underline", "Mod+U", ""],
+ ["Strikethrough", "Mod+Shift+S", "~~text~~"],
+ ["Inline code", "Mod+E", "`text`"],
+ ["Link", "Mod+K with selected text", ""],
+ ["Inline math", "", "$equation$ or \\(equation\\)"],
+ ["Undo", "Mod+Z", ""],
+ ["Redo", "Mod+Shift+Z or Mod+Y", ""],
+ ["Copy / cut / paste", "Mod+C / Mod+X / Mod+V", ""],
+ ["Select all", "Mod+A", ""],
+ ["Create a block", "Enter", ""],
+ ["Insert a line break", "Shift+Enter", ""],
+ ["Move blocks up / down", "Mod+Shift+Up / Down Arrow", ""],
+ ["Nest / unnest blocks", "Tab / Shift+Tab", ""],
+ ["Slash menu", "/", ""],
+ ["Emoji picker", ": followed by at least two search characters", ""],
+ ["Focus / close formatting toolbar", "Tab / Escape after selecting text", ""],
+ [
+ "Submit comment",
+ "Mod+Enter (or Enter by default)",
+ "Shift+Enter inserts a line break",
+ ],
+];
+
+export function Shortcuts() {
+ return (
+
+
+ Keyboard shortcuts
+
+
+ Mod means Command on macOS and Control on Windows/Linux. Input patterns
+ are typed into the editor.
+
+
+
+ Editor keyboard shortcuts
+
+
+ | Action |
+ Shortcut |
+ Input pattern |
+
+
+
+ {shortcuts.map(([action, shortcut, pattern]) => (
+
+ | {action} |
+ {shortcut || "—"} |
+ {pattern || "—"} |
+
+ ))}
+
+
+
+
+ );
+}
diff --git a/examples/01-basic/19-kitchen-sink/src/documents/columns.ts b/examples/01-basic/19-kitchen-sink/src/documents/columns.ts
new file mode 100644
index 0000000000..d76a242386
--- /dev/null
+++ b/examples/01-basic/19-kitchen-sink/src/documents/columns.ts
@@ -0,0 +1,167 @@
+import type { KitchenSinkBlock } from "../schema.js";
+
+export const columns: KitchenSinkBlock[] = [
+ {
+ type: "paragraph",
+ content: "2 columns",
+ },
+ {
+ type: "columnList",
+ children: [
+ {
+ type: "column",
+ props: {
+ width: 2,
+ },
+ children: [
+ {
+ type: "heading",
+ props: {
+ level: 2,
+ },
+ content: "Column 1",
+ },
+ {
+ type: "paragraph",
+ content: "Resize the boundary or drag blocks between columns.",
+ },
+ {
+ type: "bulletListItem",
+ content: "Nested content",
+ children: [
+ {
+ type: "paragraph",
+ content: "A child block",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ type: "column",
+ props: {
+ width: 1,
+ },
+ children: [
+ {
+ type: "heading",
+ props: {
+ level: 2,
+ },
+ content: "Column 2",
+ },
+ {
+ type: "paragraph",
+ content: "Resize the boundary or drag blocks between columns.",
+ },
+ {
+ type: "bulletListItem",
+ content: "Nested content",
+ children: [
+ {
+ type: "paragraph",
+ content: "A child block",
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ content: "3 columns",
+ },
+ {
+ type: "columnList",
+ children: [
+ {
+ type: "column",
+ props: {
+ width: 2,
+ },
+ children: [
+ {
+ type: "heading",
+ props: {
+ level: 2,
+ },
+ content: "Column 1",
+ },
+ {
+ type: "paragraph",
+ content: "Resize the boundary or drag blocks between columns.",
+ },
+ {
+ type: "bulletListItem",
+ content: "Nested content",
+ children: [
+ {
+ type: "paragraph",
+ content: "A child block",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ type: "column",
+ props: {
+ width: 1,
+ },
+ children: [
+ {
+ type: "heading",
+ props: {
+ level: 2,
+ },
+ content: "Column 2",
+ },
+ {
+ type: "paragraph",
+ content: "Resize the boundary or drag blocks between columns.",
+ },
+ {
+ type: "bulletListItem",
+ content: "Nested content",
+ children: [
+ {
+ type: "paragraph",
+ content: "A child block",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ type: "column",
+ props: {
+ width: 1,
+ },
+ children: [
+ {
+ type: "heading",
+ props: {
+ level: 2,
+ },
+ content: "Column 3",
+ },
+ {
+ type: "paragraph",
+ content: "Resize the boundary or drag blocks between columns.",
+ },
+ {
+ type: "bulletListItem",
+ content: "Nested content",
+ children: [
+ {
+ type: "paragraph",
+ content: "A child block",
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+];
diff --git a/examples/01-basic/19-kitchen-sink/src/documents/empty.ts b/examples/01-basic/19-kitchen-sink/src/documents/empty.ts
new file mode 100644
index 0000000000..15911ee1e1
--- /dev/null
+++ b/examples/01-basic/19-kitchen-sink/src/documents/empty.ts
@@ -0,0 +1,8 @@
+import type { KitchenSinkBlock } from "../schema.js";
+
+export const empty: KitchenSinkBlock[] = [
+ {
+ type: "paragraph",
+ content: "",
+ },
+];
diff --git a/examples/01-basic/19-kitchen-sink/src/documents/equations.ts b/examples/01-basic/19-kitchen-sink/src/documents/equations.ts
new file mode 100644
index 0000000000..dab96c73be
--- /dev/null
+++ b/examples/01-basic/19-kitchen-sink/src/documents/equations.ts
@@ -0,0 +1,36 @@
+import type { KitchenSinkBlock } from "../schema.js";
+
+export const equations: KitchenSinkBlock[] = [
+ {
+ type: "mathBlock",
+ content: "",
+ },
+ {
+ type: "mathBlock",
+ content: "\\int_0^\\infty e^{-x^2} dx = \\frac{\\sqrt{\\pi}}{2}",
+ },
+ {
+ type: "paragraph",
+ content: [
+ "Inline equation: ",
+ {
+ type: "math",
+ content: "e^{i\\pi}+1=0",
+ },
+ ],
+ },
+ {
+ type: "diagram",
+ content: "",
+ },
+ {
+ type: "diagram",
+ content:
+ "graph TD\n A[Start] --> B{Ready?}\n B -->|Yes| C[Finish]\n B -->|No| A",
+ },
+ {
+ type: "diagram",
+ content:
+ "sequenceDiagram\n User->>Editor: Select text\n Editor-->>User: Show toolbar",
+ },
+];
diff --git a/examples/01-basic/19-kitchen-sink/src/documents/index.ts b/examples/01-basic/19-kitchen-sink/src/documents/index.ts
new file mode 100644
index 0000000000..304dd3d3c8
--- /dev/null
+++ b/examples/01-basic/19-kitchen-sink/src/documents/index.ts
@@ -0,0 +1,17 @@
+import { empty } from "./empty.js";
+import { standardBlocks } from "./standardBlocks.js";
+import { markup } from "./markup.js";
+import { equations } from "./equations.js";
+import { tables } from "./tables.js";
+import { columns } from "./columns.js";
+
+export { empty, standardBlocks, markup, equations, tables, columns };
+
+export const presets = [
+ { id: "empty", label: "Empty document", blocks: empty },
+ { id: "standard", label: "Basic blocks", blocks: standardBlocks },
+ { id: "markup", label: "Markup", blocks: markup },
+ { id: "equations", label: "Math and diagram blocks", blocks: equations },
+ { id: "tables", label: "Advanced tables", blocks: tables },
+ { id: "columns", label: "Column layouts", blocks: columns },
+];
diff --git a/examples/01-basic/19-kitchen-sink/src/documents/markup.ts b/examples/01-basic/19-kitchen-sink/src/documents/markup.ts
new file mode 100644
index 0000000000..d8a1731993
--- /dev/null
+++ b/examples/01-basic/19-kitchen-sink/src/documents/markup.ts
@@ -0,0 +1,2194 @@
+import type { KitchenSinkBlock } from "../schema.js";
+
+export const markup: KitchenSinkBlock[] = [
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "bold",
+ styles: {
+ bold: true,
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "italic",
+ styles: {
+ italic: true,
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "underline",
+ styles: {
+ underline: true,
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "strike",
+ styles: {
+ strike: true,
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "code",
+ styles: {
+ code: true,
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Combined emphasis",
+ styles: {
+ bold: true,
+ italic: true,
+ underline: true,
+ strike: true,
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "link",
+ href: "https://www.blocknotejs.org",
+ content: "BlockNote website",
+ },
+ " and inline math: ",
+ {
+ type: "math",
+ content: "e^{i\\pi}+1=0",
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "default",
+ backgroundColor: "default",
+ },
+ content: "Block: default text / default background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: default text / default highlight",
+ styles: {
+ textColor: "default",
+ backgroundColor: "default",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "gray",
+ backgroundColor: "default",
+ },
+ content: "Block: gray text / default background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: gray text / default highlight",
+ styles: {
+ textColor: "gray",
+ backgroundColor: "default",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "brown",
+ backgroundColor: "default",
+ },
+ content: "Block: brown text / default background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: brown text / default highlight",
+ styles: {
+ textColor: "brown",
+ backgroundColor: "default",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "red",
+ backgroundColor: "default",
+ },
+ content: "Block: red text / default background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: red text / default highlight",
+ styles: {
+ textColor: "red",
+ backgroundColor: "default",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "orange",
+ backgroundColor: "default",
+ },
+ content: "Block: orange text / default background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: orange text / default highlight",
+ styles: {
+ textColor: "orange",
+ backgroundColor: "default",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "yellow",
+ backgroundColor: "default",
+ },
+ content: "Block: yellow text / default background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: yellow text / default highlight",
+ styles: {
+ textColor: "yellow",
+ backgroundColor: "default",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "green",
+ backgroundColor: "default",
+ },
+ content: "Block: green text / default background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: green text / default highlight",
+ styles: {
+ textColor: "green",
+ backgroundColor: "default",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "blue",
+ backgroundColor: "default",
+ },
+ content: "Block: blue text / default background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: blue text / default highlight",
+ styles: {
+ textColor: "blue",
+ backgroundColor: "default",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "purple",
+ backgroundColor: "default",
+ },
+ content: "Block: purple text / default background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: purple text / default highlight",
+ styles: {
+ textColor: "purple",
+ backgroundColor: "default",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "pink",
+ backgroundColor: "default",
+ },
+ content: "Block: pink text / default background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: pink text / default highlight",
+ styles: {
+ textColor: "pink",
+ backgroundColor: "default",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "default",
+ backgroundColor: "gray",
+ },
+ content: "Block: default text / gray background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: default text / gray highlight",
+ styles: {
+ textColor: "default",
+ backgroundColor: "gray",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "gray",
+ backgroundColor: "gray",
+ },
+ content: "Block: gray text / gray background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: gray text / gray highlight",
+ styles: {
+ textColor: "gray",
+ backgroundColor: "gray",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "brown",
+ backgroundColor: "gray",
+ },
+ content: "Block: brown text / gray background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: brown text / gray highlight",
+ styles: {
+ textColor: "brown",
+ backgroundColor: "gray",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "red",
+ backgroundColor: "gray",
+ },
+ content: "Block: red text / gray background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: red text / gray highlight",
+ styles: {
+ textColor: "red",
+ backgroundColor: "gray",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "orange",
+ backgroundColor: "gray",
+ },
+ content: "Block: orange text / gray background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: orange text / gray highlight",
+ styles: {
+ textColor: "orange",
+ backgroundColor: "gray",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "yellow",
+ backgroundColor: "gray",
+ },
+ content: "Block: yellow text / gray background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: yellow text / gray highlight",
+ styles: {
+ textColor: "yellow",
+ backgroundColor: "gray",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "green",
+ backgroundColor: "gray",
+ },
+ content: "Block: green text / gray background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: green text / gray highlight",
+ styles: {
+ textColor: "green",
+ backgroundColor: "gray",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "blue",
+ backgroundColor: "gray",
+ },
+ content: "Block: blue text / gray background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: blue text / gray highlight",
+ styles: {
+ textColor: "blue",
+ backgroundColor: "gray",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "purple",
+ backgroundColor: "gray",
+ },
+ content: "Block: purple text / gray background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: purple text / gray highlight",
+ styles: {
+ textColor: "purple",
+ backgroundColor: "gray",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "pink",
+ backgroundColor: "gray",
+ },
+ content: "Block: pink text / gray background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: pink text / gray highlight",
+ styles: {
+ textColor: "pink",
+ backgroundColor: "gray",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "default",
+ backgroundColor: "brown",
+ },
+ content: "Block: default text / brown background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: default text / brown highlight",
+ styles: {
+ textColor: "default",
+ backgroundColor: "brown",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "gray",
+ backgroundColor: "brown",
+ },
+ content: "Block: gray text / brown background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: gray text / brown highlight",
+ styles: {
+ textColor: "gray",
+ backgroundColor: "brown",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "brown",
+ backgroundColor: "brown",
+ },
+ content: "Block: brown text / brown background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: brown text / brown highlight",
+ styles: {
+ textColor: "brown",
+ backgroundColor: "brown",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "red",
+ backgroundColor: "brown",
+ },
+ content: "Block: red text / brown background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: red text / brown highlight",
+ styles: {
+ textColor: "red",
+ backgroundColor: "brown",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "orange",
+ backgroundColor: "brown",
+ },
+ content: "Block: orange text / brown background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: orange text / brown highlight",
+ styles: {
+ textColor: "orange",
+ backgroundColor: "brown",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "yellow",
+ backgroundColor: "brown",
+ },
+ content: "Block: yellow text / brown background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: yellow text / brown highlight",
+ styles: {
+ textColor: "yellow",
+ backgroundColor: "brown",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "green",
+ backgroundColor: "brown",
+ },
+ content: "Block: green text / brown background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: green text / brown highlight",
+ styles: {
+ textColor: "green",
+ backgroundColor: "brown",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "blue",
+ backgroundColor: "brown",
+ },
+ content: "Block: blue text / brown background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: blue text / brown highlight",
+ styles: {
+ textColor: "blue",
+ backgroundColor: "brown",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "purple",
+ backgroundColor: "brown",
+ },
+ content: "Block: purple text / brown background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: purple text / brown highlight",
+ styles: {
+ textColor: "purple",
+ backgroundColor: "brown",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "pink",
+ backgroundColor: "brown",
+ },
+ content: "Block: pink text / brown background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: pink text / brown highlight",
+ styles: {
+ textColor: "pink",
+ backgroundColor: "brown",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "default",
+ backgroundColor: "red",
+ },
+ content: "Block: default text / red background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: default text / red highlight",
+ styles: {
+ textColor: "default",
+ backgroundColor: "red",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "gray",
+ backgroundColor: "red",
+ },
+ content: "Block: gray text / red background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: gray text / red highlight",
+ styles: {
+ textColor: "gray",
+ backgroundColor: "red",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "brown",
+ backgroundColor: "red",
+ },
+ content: "Block: brown text / red background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: brown text / red highlight",
+ styles: {
+ textColor: "brown",
+ backgroundColor: "red",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "red",
+ backgroundColor: "red",
+ },
+ content: "Block: red text / red background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: red text / red highlight",
+ styles: {
+ textColor: "red",
+ backgroundColor: "red",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "orange",
+ backgroundColor: "red",
+ },
+ content: "Block: orange text / red background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: orange text / red highlight",
+ styles: {
+ textColor: "orange",
+ backgroundColor: "red",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "yellow",
+ backgroundColor: "red",
+ },
+ content: "Block: yellow text / red background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: yellow text / red highlight",
+ styles: {
+ textColor: "yellow",
+ backgroundColor: "red",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "green",
+ backgroundColor: "red",
+ },
+ content: "Block: green text / red background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: green text / red highlight",
+ styles: {
+ textColor: "green",
+ backgroundColor: "red",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "blue",
+ backgroundColor: "red",
+ },
+ content: "Block: blue text / red background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: blue text / red highlight",
+ styles: {
+ textColor: "blue",
+ backgroundColor: "red",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "purple",
+ backgroundColor: "red",
+ },
+ content: "Block: purple text / red background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: purple text / red highlight",
+ styles: {
+ textColor: "purple",
+ backgroundColor: "red",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "pink",
+ backgroundColor: "red",
+ },
+ content: "Block: pink text / red background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: pink text / red highlight",
+ styles: {
+ textColor: "pink",
+ backgroundColor: "red",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "default",
+ backgroundColor: "orange",
+ },
+ content: "Block: default text / orange background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: default text / orange highlight",
+ styles: {
+ textColor: "default",
+ backgroundColor: "orange",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "gray",
+ backgroundColor: "orange",
+ },
+ content: "Block: gray text / orange background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: gray text / orange highlight",
+ styles: {
+ textColor: "gray",
+ backgroundColor: "orange",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "brown",
+ backgroundColor: "orange",
+ },
+ content: "Block: brown text / orange background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: brown text / orange highlight",
+ styles: {
+ textColor: "brown",
+ backgroundColor: "orange",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "red",
+ backgroundColor: "orange",
+ },
+ content: "Block: red text / orange background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: red text / orange highlight",
+ styles: {
+ textColor: "red",
+ backgroundColor: "orange",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "orange",
+ backgroundColor: "orange",
+ },
+ content: "Block: orange text / orange background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: orange text / orange highlight",
+ styles: {
+ textColor: "orange",
+ backgroundColor: "orange",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "yellow",
+ backgroundColor: "orange",
+ },
+ content: "Block: yellow text / orange background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: yellow text / orange highlight",
+ styles: {
+ textColor: "yellow",
+ backgroundColor: "orange",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "green",
+ backgroundColor: "orange",
+ },
+ content: "Block: green text / orange background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: green text / orange highlight",
+ styles: {
+ textColor: "green",
+ backgroundColor: "orange",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "blue",
+ backgroundColor: "orange",
+ },
+ content: "Block: blue text / orange background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: blue text / orange highlight",
+ styles: {
+ textColor: "blue",
+ backgroundColor: "orange",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "purple",
+ backgroundColor: "orange",
+ },
+ content: "Block: purple text / orange background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: purple text / orange highlight",
+ styles: {
+ textColor: "purple",
+ backgroundColor: "orange",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "pink",
+ backgroundColor: "orange",
+ },
+ content: "Block: pink text / orange background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: pink text / orange highlight",
+ styles: {
+ textColor: "pink",
+ backgroundColor: "orange",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "default",
+ backgroundColor: "yellow",
+ },
+ content: "Block: default text / yellow background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: default text / yellow highlight",
+ styles: {
+ textColor: "default",
+ backgroundColor: "yellow",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "gray",
+ backgroundColor: "yellow",
+ },
+ content: "Block: gray text / yellow background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: gray text / yellow highlight",
+ styles: {
+ textColor: "gray",
+ backgroundColor: "yellow",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "brown",
+ backgroundColor: "yellow",
+ },
+ content: "Block: brown text / yellow background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: brown text / yellow highlight",
+ styles: {
+ textColor: "brown",
+ backgroundColor: "yellow",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "red",
+ backgroundColor: "yellow",
+ },
+ content: "Block: red text / yellow background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: red text / yellow highlight",
+ styles: {
+ textColor: "red",
+ backgroundColor: "yellow",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "orange",
+ backgroundColor: "yellow",
+ },
+ content: "Block: orange text / yellow background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: orange text / yellow highlight",
+ styles: {
+ textColor: "orange",
+ backgroundColor: "yellow",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "yellow",
+ backgroundColor: "yellow",
+ },
+ content: "Block: yellow text / yellow background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: yellow text / yellow highlight",
+ styles: {
+ textColor: "yellow",
+ backgroundColor: "yellow",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "green",
+ backgroundColor: "yellow",
+ },
+ content: "Block: green text / yellow background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: green text / yellow highlight",
+ styles: {
+ textColor: "green",
+ backgroundColor: "yellow",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "blue",
+ backgroundColor: "yellow",
+ },
+ content: "Block: blue text / yellow background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: blue text / yellow highlight",
+ styles: {
+ textColor: "blue",
+ backgroundColor: "yellow",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "purple",
+ backgroundColor: "yellow",
+ },
+ content: "Block: purple text / yellow background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: purple text / yellow highlight",
+ styles: {
+ textColor: "purple",
+ backgroundColor: "yellow",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "pink",
+ backgroundColor: "yellow",
+ },
+ content: "Block: pink text / yellow background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: pink text / yellow highlight",
+ styles: {
+ textColor: "pink",
+ backgroundColor: "yellow",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "default",
+ backgroundColor: "green",
+ },
+ content: "Block: default text / green background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: default text / green highlight",
+ styles: {
+ textColor: "default",
+ backgroundColor: "green",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "gray",
+ backgroundColor: "green",
+ },
+ content: "Block: gray text / green background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: gray text / green highlight",
+ styles: {
+ textColor: "gray",
+ backgroundColor: "green",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "brown",
+ backgroundColor: "green",
+ },
+ content: "Block: brown text / green background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: brown text / green highlight",
+ styles: {
+ textColor: "brown",
+ backgroundColor: "green",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "red",
+ backgroundColor: "green",
+ },
+ content: "Block: red text / green background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: red text / green highlight",
+ styles: {
+ textColor: "red",
+ backgroundColor: "green",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "orange",
+ backgroundColor: "green",
+ },
+ content: "Block: orange text / green background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: orange text / green highlight",
+ styles: {
+ textColor: "orange",
+ backgroundColor: "green",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "yellow",
+ backgroundColor: "green",
+ },
+ content: "Block: yellow text / green background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: yellow text / green highlight",
+ styles: {
+ textColor: "yellow",
+ backgroundColor: "green",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "green",
+ backgroundColor: "green",
+ },
+ content: "Block: green text / green background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: green text / green highlight",
+ styles: {
+ textColor: "green",
+ backgroundColor: "green",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "blue",
+ backgroundColor: "green",
+ },
+ content: "Block: blue text / green background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: blue text / green highlight",
+ styles: {
+ textColor: "blue",
+ backgroundColor: "green",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "purple",
+ backgroundColor: "green",
+ },
+ content: "Block: purple text / green background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: purple text / green highlight",
+ styles: {
+ textColor: "purple",
+ backgroundColor: "green",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "pink",
+ backgroundColor: "green",
+ },
+ content: "Block: pink text / green background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: pink text / green highlight",
+ styles: {
+ textColor: "pink",
+ backgroundColor: "green",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "default",
+ backgroundColor: "blue",
+ },
+ content: "Block: default text / blue background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: default text / blue highlight",
+ styles: {
+ textColor: "default",
+ backgroundColor: "blue",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "gray",
+ backgroundColor: "blue",
+ },
+ content: "Block: gray text / blue background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: gray text / blue highlight",
+ styles: {
+ textColor: "gray",
+ backgroundColor: "blue",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "brown",
+ backgroundColor: "blue",
+ },
+ content: "Block: brown text / blue background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: brown text / blue highlight",
+ styles: {
+ textColor: "brown",
+ backgroundColor: "blue",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "red",
+ backgroundColor: "blue",
+ },
+ content: "Block: red text / blue background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: red text / blue highlight",
+ styles: {
+ textColor: "red",
+ backgroundColor: "blue",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "orange",
+ backgroundColor: "blue",
+ },
+ content: "Block: orange text / blue background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: orange text / blue highlight",
+ styles: {
+ textColor: "orange",
+ backgroundColor: "blue",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "yellow",
+ backgroundColor: "blue",
+ },
+ content: "Block: yellow text / blue background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: yellow text / blue highlight",
+ styles: {
+ textColor: "yellow",
+ backgroundColor: "blue",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "green",
+ backgroundColor: "blue",
+ },
+ content: "Block: green text / blue background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: green text / blue highlight",
+ styles: {
+ textColor: "green",
+ backgroundColor: "blue",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "blue",
+ backgroundColor: "blue",
+ },
+ content: "Block: blue text / blue background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: blue text / blue highlight",
+ styles: {
+ textColor: "blue",
+ backgroundColor: "blue",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "purple",
+ backgroundColor: "blue",
+ },
+ content: "Block: purple text / blue background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: purple text / blue highlight",
+ styles: {
+ textColor: "purple",
+ backgroundColor: "blue",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "pink",
+ backgroundColor: "blue",
+ },
+ content: "Block: pink text / blue background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: pink text / blue highlight",
+ styles: {
+ textColor: "pink",
+ backgroundColor: "blue",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "default",
+ backgroundColor: "purple",
+ },
+ content: "Block: default text / purple background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: default text / purple highlight",
+ styles: {
+ textColor: "default",
+ backgroundColor: "purple",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "gray",
+ backgroundColor: "purple",
+ },
+ content: "Block: gray text / purple background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: gray text / purple highlight",
+ styles: {
+ textColor: "gray",
+ backgroundColor: "purple",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "brown",
+ backgroundColor: "purple",
+ },
+ content: "Block: brown text / purple background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: brown text / purple highlight",
+ styles: {
+ textColor: "brown",
+ backgroundColor: "purple",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "red",
+ backgroundColor: "purple",
+ },
+ content: "Block: red text / purple background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: red text / purple highlight",
+ styles: {
+ textColor: "red",
+ backgroundColor: "purple",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "orange",
+ backgroundColor: "purple",
+ },
+ content: "Block: orange text / purple background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: orange text / purple highlight",
+ styles: {
+ textColor: "orange",
+ backgroundColor: "purple",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "yellow",
+ backgroundColor: "purple",
+ },
+ content: "Block: yellow text / purple background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: yellow text / purple highlight",
+ styles: {
+ textColor: "yellow",
+ backgroundColor: "purple",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "green",
+ backgroundColor: "purple",
+ },
+ content: "Block: green text / purple background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: green text / purple highlight",
+ styles: {
+ textColor: "green",
+ backgroundColor: "purple",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "blue",
+ backgroundColor: "purple",
+ },
+ content: "Block: blue text / purple background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: blue text / purple highlight",
+ styles: {
+ textColor: "blue",
+ backgroundColor: "purple",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "purple",
+ backgroundColor: "purple",
+ },
+ content: "Block: purple text / purple background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: purple text / purple highlight",
+ styles: {
+ textColor: "purple",
+ backgroundColor: "purple",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "pink",
+ backgroundColor: "purple",
+ },
+ content: "Block: pink text / purple background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: pink text / purple highlight",
+ styles: {
+ textColor: "pink",
+ backgroundColor: "purple",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "default",
+ backgroundColor: "pink",
+ },
+ content: "Block: default text / pink background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: default text / pink highlight",
+ styles: {
+ textColor: "default",
+ backgroundColor: "pink",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "gray",
+ backgroundColor: "pink",
+ },
+ content: "Block: gray text / pink background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: gray text / pink highlight",
+ styles: {
+ textColor: "gray",
+ backgroundColor: "pink",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "brown",
+ backgroundColor: "pink",
+ },
+ content: "Block: brown text / pink background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: brown text / pink highlight",
+ styles: {
+ textColor: "brown",
+ backgroundColor: "pink",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "red",
+ backgroundColor: "pink",
+ },
+ content: "Block: red text / pink background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: red text / pink highlight",
+ styles: {
+ textColor: "red",
+ backgroundColor: "pink",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "orange",
+ backgroundColor: "pink",
+ },
+ content: "Block: orange text / pink background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: orange text / pink highlight",
+ styles: {
+ textColor: "orange",
+ backgroundColor: "pink",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "yellow",
+ backgroundColor: "pink",
+ },
+ content: "Block: yellow text / pink background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: yellow text / pink highlight",
+ styles: {
+ textColor: "yellow",
+ backgroundColor: "pink",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "green",
+ backgroundColor: "pink",
+ },
+ content: "Block: green text / pink background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: green text / pink highlight",
+ styles: {
+ textColor: "green",
+ backgroundColor: "pink",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "blue",
+ backgroundColor: "pink",
+ },
+ content: "Block: blue text / pink background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: blue text / pink highlight",
+ styles: {
+ textColor: "blue",
+ backgroundColor: "pink",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "purple",
+ backgroundColor: "pink",
+ },
+ content: "Block: purple text / pink background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: purple text / pink highlight",
+ styles: {
+ textColor: "purple",
+ backgroundColor: "pink",
+ },
+ },
+ ],
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "pink",
+ backgroundColor: "pink",
+ },
+ content: "Block: pink text / pink background",
+ },
+ {
+ type: "paragraph",
+ content: [
+ {
+ type: "text",
+ text: "Inline: pink text / pink highlight",
+ styles: {
+ textColor: "pink",
+ backgroundColor: "pink",
+ },
+ },
+ ],
+ },
+];
diff --git a/examples/01-basic/19-kitchen-sink/src/documents/standardBlocks.ts b/examples/01-basic/19-kitchen-sink/src/documents/standardBlocks.ts
new file mode 100644
index 0000000000..c1b6ad6877
--- /dev/null
+++ b/examples/01-basic/19-kitchen-sink/src/documents/standardBlocks.ts
@@ -0,0 +1,233 @@
+import type { KitchenSinkBlock } from "../schema.js";
+
+export const standardBlocks: KitchenSinkBlock[] = [
+ {
+ type: "paragraph",
+ content: "Paragraph",
+ },
+ {
+ type: "paragraph",
+ props: {
+ textColor: "blue",
+ backgroundColor: "yellow",
+ textAlignment: "right",
+ },
+ content: "Paragraph with markup",
+ },
+ {
+ type: "heading",
+ props: {
+ level: 1,
+ },
+ content: "Heading 1",
+ },
+ {
+ type: "heading",
+ props: {
+ level: 2,
+ },
+ content: "Heading 2",
+ },
+ {
+ type: "heading",
+ props: {
+ level: 3,
+ },
+ content: "Heading 3",
+ },
+ {
+ type: "heading",
+ props: {
+ level: 4,
+ },
+ content: "Heading 4",
+ },
+ {
+ type: "heading",
+ props: {
+ level: 5,
+ },
+ content: "Heading 5",
+ },
+ {
+ type: "heading",
+ props: {
+ level: 6,
+ },
+ content: "Heading 6",
+ },
+ {
+ type: "heading",
+ props: {
+ isToggleable: true,
+ },
+ content: "Collapsible heading",
+ children: [
+ {
+ type: "paragraph",
+ content: "Nested content",
+ },
+ ],
+ },
+ {
+ type: "heading",
+ props: {
+ isToggleable: true,
+ },
+ content: "Empty collapsible heading",
+ },
+ {
+ type: "quote",
+ content: "Quote",
+ },
+ {
+ type: "bulletListItem",
+ content: "Bulleted list item",
+ children: [
+ {
+ type: "paragraph",
+ content: "Nested child",
+ },
+ {
+ type: "bulletListItem",
+ content: "Nested list",
+ children: [
+ {
+ type: "paragraph",
+ content: "Second nesting level",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ type: "numberedListItem",
+ content: "Numbered list item",
+ },
+ {
+ type: "checkListItem",
+ content: "Unchecked checklist item",
+ },
+ {
+ type: "checkListItem",
+ props: {
+ checked: true,
+ },
+ content: "Checked checklist item",
+ },
+ {
+ type: "toggleListItem",
+ content: "Toggle list item",
+ children: [
+ {
+ type: "paragraph",
+ content: "Nested content",
+ },
+ ],
+ },
+ {
+ type: "toggleListItem",
+ content: "Empty toggle list item",
+ },
+ {
+ type: "codeBlock",
+ content: "Plain text code block",
+ },
+ {
+ type: "codeBlock",
+ props: {
+ language: "javascript",
+ },
+ content: 'function greet() {\n return "Hello, world!";\n}',
+ },
+ {
+ type: "table",
+ content: {
+ type: "tableContent",
+ rows: [
+ {
+ cells: ["A", "B"],
+ },
+ {
+ cells: ["C", "D"],
+ },
+ ],
+ },
+ },
+ {
+ type: "paragraph",
+ content: "Divider",
+ },
+ {
+ type: "divider",
+ },
+ {
+ type: "paragraph",
+ content: "Files",
+ },
+ {
+ type: "file",
+ },
+ {
+ type: "file",
+ props: {
+ url: "data:text/plain,Example%20attachment",
+ name: "Example attachment.txt",
+ caption: "Example attachment.txt caption",
+ },
+ },
+ {
+ type: "paragraph",
+ content: "Images",
+ },
+ {
+ type: "image",
+ },
+ {
+ type: "image",
+ props: {
+ url: "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22320%22%20height%3D%22180%22%3E%3Crect%20width%3D%22320%22%20height%3D%22180%22%20fill%3D%22%23cfedff%22%2F%3E%3Ccircle%20cx%3D%22160%22%20cy%3D%2290%22%20r%3D%2260%22%20fill%3D%22%23006d9a%22%2F%3E%3C%2Fsvg%3E",
+ name: "Blue circle on a pale blue background",
+ caption: "Blue circle on a pale blue background caption",
+ previewWidth: 280,
+ },
+ },
+ {
+ type: "paragraph",
+ content: "Videos",
+ },
+ {
+ type: "video",
+ },
+ {
+ type: "video",
+ props: {
+ url: "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm",
+ name: "Flower video",
+ caption: "Flower video caption",
+ previewWidth: 280,
+ },
+ },
+ {
+ type: "paragraph",
+ content: "Audio",
+ },
+ {
+ type: "audio",
+ },
+ {
+ type: "audio",
+ props: {
+ url: "https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3",
+ name: "Tyrannosaurus roar",
+ caption: "Tyrannosaurus roar caption",
+ },
+ },
+ {
+ type: "paragraph",
+ content: "Page break",
+ },
+ {
+ type: "pageBreak",
+ },
+];
diff --git a/examples/01-basic/19-kitchen-sink/src/documents/tables.ts b/examples/01-basic/19-kitchen-sink/src/documents/tables.ts
new file mode 100644
index 0000000000..26c71f7a38
--- /dev/null
+++ b/examples/01-basic/19-kitchen-sink/src/documents/tables.ts
@@ -0,0 +1,118 @@
+import type { KitchenSinkBlock } from "../schema.js";
+
+export const tables: KitchenSinkBlock[] = [
+ {
+ type: "paragraph",
+ content: "Row and column headers with cell colors",
+ },
+ {
+ type: "table",
+ content: {
+ type: "tableContent",
+ headerRows: 1,
+ headerCols: 1,
+ columnWidths: [160, 220, 180],
+ rows: [
+ {
+ cells: ["Team", "Project", "Status"],
+ },
+ {
+ cells: [
+ {
+ type: "tableCell",
+ content: ["Design"],
+ },
+ {
+ type: "tableCell",
+ props: {
+ backgroundColor: "yellow",
+ textColor: "blue",
+ textAlignment: "center",
+ },
+ content: ["Website redesign"],
+ },
+ {
+ type: "tableCell",
+ content: ["Review"],
+ },
+ ],
+ },
+ {
+ cells: ["Engineering", "Editor", "Ready"],
+ },
+ ],
+ },
+ },
+ {
+ type: "paragraph",
+ content: "Merged columns",
+ },
+ {
+ type: "table",
+ content: {
+ type: "tableContent",
+ headerRows: 1,
+ rows: [
+ {
+ cells: [
+ {
+ type: "tableCell",
+ props: {
+ colspan: 2,
+ backgroundColor: "blue",
+ },
+ content: ["Combined header"],
+ },
+ {
+ type: "tableCell",
+ content: ["Third column"],
+ },
+ ],
+ },
+ {
+ cells: ["A", "B", "C"],
+ },
+ {
+ cells: ["D", "E", "F"],
+ },
+ ],
+ },
+ },
+ {
+ type: "paragraph",
+ content: "Merged rows and columns",
+ },
+ {
+ type: "table",
+ content: {
+ type: "tableContent",
+ rows: [
+ {
+ cells: [
+ {
+ type: "tableCell",
+ props: {
+ rowspan: 2,
+ colspan: 2,
+ backgroundColor: "purple",
+ textColor: "yellow",
+ textAlignment: "right",
+ },
+ content: ["Two rows × two columns"],
+ },
+ {
+ type: "tableCell",
+ content: ["Top right"],
+ },
+ ],
+ },
+ {
+ cells: ["Bottom right"],
+ },
+ {
+ cells: ["A", "B", "C"],
+ },
+ ],
+ },
+ },
+];
diff --git a/examples/01-basic/19-kitchen-sink/src/schema.ts b/examples/01-basic/19-kitchen-sink/src/schema.ts
new file mode 100644
index 0000000000..e4793a6bb4
--- /dev/null
+++ b/examples/01-basic/19-kitchen-sink/src/schema.ts
@@ -0,0 +1,25 @@
+import { codeBlockOptions } from "@blocknote/code-block";
+import {
+ BlockNoteSchema,
+ createCodeBlockSpec,
+ withPageBreak,
+} from "@blocknote/core";
+import { createReactDiagramBlockSpec } from "@blocknote/diagram-block";
+import {
+ createReactInlineMathSpec,
+ createReactMathBlockSpec,
+} from "@blocknote/math-block";
+import { withMultiColumn } from "@blocknote/xl-multi-column";
+
+export const schema = withMultiColumn(
+ withPageBreak(BlockNoteSchema.create()),
+).extend({
+ blockSpecs: {
+ codeBlock: createCodeBlockSpec(codeBlockOptions),
+ mathBlock: createReactMathBlockSpec(),
+ diagram: createReactDiagramBlockSpec(),
+ },
+ inlineContentSpecs: { math: createReactInlineMathSpec() },
+});
+export type KitchenSinkBlock = typeof schema.PartialBlock;
+export type KitchenSinkEditor = typeof schema.BlockNoteEditor;
diff --git a/examples/01-basic/19-kitchen-sink/src/session.ts b/examples/01-basic/19-kitchen-sink/src/session.ts
new file mode 100644
index 0000000000..00a1620d41
--- /dev/null
+++ b/examples/01-basic/19-kitchen-sink/src/session.ts
@@ -0,0 +1,35 @@
+import { WebsocketProvider } from "@y/websocket";
+import * as Y from "@y/y";
+
+export function createSession() {
+ const url = new URL(window.location.href);
+ const existingRoom = url.searchParams.get("room");
+ const room = existingRoom ?? crypto.randomUUID();
+
+ url.searchParams.set("room", room);
+ window.history.replaceState(window.history.state, "", url);
+
+ const id = crypto.randomUUID();
+ const colors = ["#958df1", "#f98181", "#fbbc88", "#70cff8", "#94fadb"];
+ const doc = new Y.Doc();
+ const user = {
+ id,
+ name: `User ${id.slice(0, 4)}`,
+ color: colors[doc.clientID % colors.length],
+ };
+
+ // Connect when the example mounts; the Yjs binding handles initial loading.
+ const provider = new WebsocketProvider(
+ "wss://yhub.teleportal.tools/api/ws/v1",
+ `blocknote/kitchen-sink-${room}`,
+ doc,
+ { connect: false, params: { userid: user.id } },
+ );
+
+ return {
+ doc,
+ provider,
+ user,
+ href: url.href,
+ };
+}
diff --git a/examples/01-basic/19-kitchen-sink/src/style.css b/examples/01-basic/19-kitchen-sink/src/style.css
new file mode 100644
index 0000000000..89b7e9c778
--- /dev/null
+++ b/examples/01-basic/19-kitchen-sink/src/style.css
@@ -0,0 +1,337 @@
+/* The demo scrolls within its panels, including when hosted in the playground. */
+html:has(.kitchen-sink),
+body:has(.kitchen-sink),
+.bn-scroll-container:has(.kitchen-sink) {
+ overflow: clip;
+ overscroll-behavior: none;
+}
+
+body:has(.kitchen-sink) {
+ margin: 0;
+}
+
+.kitchen-sink {
+ --ks-background: #f5f5f5;
+ --ks-surface: #fff;
+ --ks-subtle: #f8fafc;
+ --ks-control-background: #fafafa;
+ --ks-control-hover: #eeeeee;
+ --ks-border: #e5e5e5;
+ --ks-text: #202b3c;
+ --ks-muted: #59677a;
+ --ks-accent: #345dcc;
+ --ks-accent-soft: #edf2ff;
+ box-sizing: border-box;
+ display: grid;
+ grid-template-columns: 280px minmax(0, 1fr);
+ height: 100dvh;
+ overflow: hidden;
+ background: var(--ks-background);
+ color: var(--ks-text);
+ font-family: Inter, sans-serif;
+ font-size: 14px;
+ line-height: 1.5;
+ color-scheme: light;
+}
+
+.kitchen-sink[data-theme="dark"] {
+ --ks-background: #171717;
+ --ks-surface: #1f1f1f;
+ --ks-subtle: #252a33;
+ --ks-control-background: #272727;
+ --ks-control-hover: #333333;
+ --ks-border: #3b3b3b;
+ --ks-text: #edf0f5;
+ --ks-muted: #a8b2c3;
+ --ks-accent: #a3baff;
+ --ks-accent-soft: #283349;
+ color-scheme: dark;
+}
+
+.kitchen-sink-options {
+ min-height: 0;
+ overflow: auto;
+ overscroll-behavior: contain;
+ padding: 28px 22px;
+ border-right: 1px solid var(--ks-border);
+ background: var(--ks-surface);
+}
+
+.kitchen-sink-brand {
+ margin-bottom: 32px;
+}
+
+.kitchen-sink-title {
+ margin: 0;
+ font-size: 17px;
+ font-weight: 650;
+ line-height: 1.35;
+ letter-spacing: -0.025em;
+}
+
+.kitchen-sink-settings-group + .kitchen-sink-settings-group {
+ margin-top: 24px;
+ padding-top: 24px;
+ border-top: 1px solid var(--ks-border);
+}
+
+.kitchen-sink-group-title {
+ margin: 0 0 14px;
+ color: var(--ks-muted);
+ font-size: 12px;
+ font-weight: 600;
+}
+
+.kitchen-sink-toggle {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 12px;
+ min-height: 36px;
+ cursor: pointer;
+}
+
+.kitchen-sink-checkbox {
+ width: 17px;
+ height: 17px;
+ margin: 0;
+ accent-color: var(--ks-accent);
+ cursor: pointer;
+}
+
+.kitchen-sink-field {
+ display: grid;
+ gap: 8px;
+ font-weight: 550;
+}
+
+.kitchen-sink-select {
+ appearance: none;
+ box-sizing: border-box;
+ width: 100%;
+ min-width: 0;
+ min-height: 40px;
+ padding: 8px 36px 8px 12px;
+ border: 1px solid var(--ks-border);
+ border-radius: 8px;
+ background-color: var(--ks-control-background);
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23888888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
+ background-repeat: no-repeat;
+ background-position: right 12px center;
+ color: var(--ks-text);
+ font: inherit;
+ font-size: 13px;
+ font-weight: 400;
+}
+
+.kitchen-sink-help {
+ margin: 10px 0 20px;
+ color: var(--ks-muted);
+ font-size: 12px;
+ line-height: 1.65;
+}
+
+.kitchen-sink-identity {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ margin: 0;
+ font-size: 13px;
+ font-weight: 550;
+}
+
+.kitchen-sink-avatar {
+ display: grid;
+ place-items: center;
+ width: 30px;
+ height: 30px;
+ border-radius: 50%;
+ background: var(--ks-accent-soft);
+ color: var(--ks-accent);
+ font-size: 11px;
+ font-weight: 650;
+}
+
+.kitchen-sink-button {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 8px;
+ padding: 10px 12px;
+ border: 1px solid var(--ks-border);
+ border-radius: 8px;
+ background: var(--ks-control-background);
+ color: var(--ks-accent);
+ font-size: 12px;
+ font-weight: 550;
+ text-decoration: none;
+}
+
+.kitchen-sink-button:hover {
+ background: var(--ks-control-hover);
+}
+
+.kitchen-sink-main {
+ display: grid;
+ grid-template-rows: minmax(0, 1fr) auto;
+ gap: 16px;
+ min-width: 0;
+ min-height: 0;
+ padding: 24px;
+}
+
+.kitchen-sink-editor {
+ display: flex;
+ flex: 1 1 0;
+ flex-direction: column;
+ min-width: 0;
+ min-height: 0;
+ overflow: hidden;
+ border: 1px solid var(--ks-border);
+ border-radius: 12px;
+ background: var(--ks-surface);
+ box-shadow: 0 2px 8px #00000004;
+}
+
+.kitchen-sink-panel-header {
+ display: flex;
+ flex: 0 0 auto;
+ align-items: center;
+ justify-content: space-between;
+ flex-wrap: wrap;
+ gap: 8px;
+ min-height: 54px;
+ box-sizing: border-box;
+ padding: 12px 20px;
+ border-bottom: 1px solid var(--ks-border);
+}
+
+.kitchen-sink-panel-title {
+ margin: 0;
+ font-size: 13px;
+ font-weight: 600;
+}
+
+.kitchen-sink-badge {
+ padding: 3px 8px;
+ border-radius: 5px;
+ background: var(--ks-subtle);
+ color: var(--ks-muted);
+ font-size: 11px;
+ font-weight: 500;
+}
+
+.kitchen-sink-editor-scroll {
+ flex: 1;
+ min-height: 0;
+ overflow: auto;
+ overscroll-behavior: contain;
+ padding: 24px 0;
+ scrollbar-gutter: stable;
+}
+
+.kitchen-sink-download {
+ width: 100%;
+ margin-top: 12px;
+ justify-content: center;
+}
+
+.kitchen-sink-loading-status {
+ margin: 20px;
+ color: var(--ks-muted);
+ font-size: 13px;
+}
+
+.kitchen-sink-shortcuts {
+ min-height: 0;
+ max-height: 35dvh;
+ overflow: auto;
+ overscroll-behavior: contain;
+ border: 1px solid var(--ks-border);
+ border-radius: 10px;
+ background: var(--ks-surface);
+}
+
+.kitchen-sink-shortcuts-summary {
+ position: sticky;
+ top: 0;
+ padding: 14px 18px;
+ background: var(--ks-surface);
+ font-size: 13px;
+ font-weight: 550;
+ cursor: pointer;
+}
+
+.kitchen-sink-shortcuts-help {
+ margin: 12px 18px 18px;
+ color: var(--ks-muted);
+ font-size: 13px;
+}
+
+.kitchen-sink-shortcuts-table-scroll {
+ overflow-x: auto;
+ margin: 0 18px;
+}
+
+.kitchen-sink-shortcuts-table {
+ width: 100%;
+ border-collapse: collapse;
+ font-size: 12px;
+}
+
+.kitchen-sink-shortcuts-table > caption {
+ padding: 0 0 12px;
+ text-align: left;
+ font-weight: 600;
+}
+
+.kitchen-sink-shortcuts-table > :is(thead, tbody) > tr > :is(th, td) {
+ padding: 10px 12px;
+ border: 1px solid var(--ks-border);
+ text-align: left;
+}
+
+.kitchen-sink-shortcuts-table > thead {
+ background: var(--ks-subtle);
+}
+
+:is(
+ .kitchen-sink-button,
+ .kitchen-sink-checkbox,
+ .kitchen-sink-select,
+ .kitchen-sink-shortcuts-summary
+):focus-visible {
+ outline: 2px solid var(--ks-accent);
+ outline-offset: -3px;
+}
+
+@media (max-width: 900px) {
+ .kitchen-sink {
+ grid-template-columns: 220px minmax(0, 1fr);
+ }
+ .kitchen-sink-options {
+ padding: 20px 16px;
+ }
+ .kitchen-sink-main {
+ padding: 16px;
+ }
+}
+
+@media (max-width: 600px) {
+ .kitchen-sink {
+ grid-template-columns: minmax(0, 1fr);
+ grid-template-rows: auto minmax(0, 1fr);
+ }
+ .kitchen-sink-options {
+ max-height: 28dvh;
+ border-right: 0;
+ border-bottom: 1px solid var(--ks-border);
+ }
+ .kitchen-sink-brand {
+ margin-bottom: 20px;
+ }
+ .kitchen-sink-main {
+ padding: 12px;
+ gap: 12px;
+ }
+}
diff --git a/examples/01-basic/19-kitchen-sink/tsconfig.json b/examples/01-basic/19-kitchen-sink/tsconfig.json
new file mode 100644
index 0000000000..93fa81bee8
--- /dev/null
+++ b/examples/01-basic/19-kitchen-sink/tsconfig.json
@@ -0,0 +1,29 @@
+{
+ "__comment": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY",
+ "compilerOptions": {
+ "target": "ESNext",
+ "useDefineForClassFields": true,
+ "lib": ["DOM", "DOM.Iterable", "ESNext"],
+ "allowJs": false,
+ "skipLibCheck": true,
+ "allowSyntheticDefaultImports": true,
+ "strict": true,
+ "forceConsistentCasingInFileNames": true,
+ "module": "ESNext",
+ "moduleResolution": "bundler",
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "noEmit": true,
+ "jsx": "react-jsx",
+ "composite": true
+ },
+ "include": ["."],
+ "__ADD_FOR_LOCAL_DEV_references": [
+ {
+ "path": "../../../packages/core/"
+ },
+ {
+ "path": "../../../packages/react/"
+ }
+ ]
+}
diff --git a/examples/01-basic/19-kitchen-sink/vite-env.d.ts b/examples/01-basic/19-kitchen-sink/vite-env.d.ts
new file mode 100644
index 0000000000..11f02fe2a0
--- /dev/null
+++ b/examples/01-basic/19-kitchen-sink/vite-env.d.ts
@@ -0,0 +1 @@
+///
diff --git a/examples/01-basic/19-kitchen-sink/vite.config.ts b/examples/01-basic/19-kitchen-sink/vite.config.ts
new file mode 100644
index 0000000000..c0133c736c
--- /dev/null
+++ b/examples/01-basic/19-kitchen-sink/vite.config.ts
@@ -0,0 +1,31 @@
+// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
+import react from "@vitejs/plugin-react";
+import * as fs from "fs";
+import * as path from "path";
+import { defineConfig } from "vite";
+// https://vitejs.dev/config/
+export default defineConfig(((conf: { command: string }) => ({
+ plugins: [react()],
+ optimizeDeps: {},
+ build: {
+ sourcemap: true,
+ },
+ resolve: {
+ alias:
+ conf.command === "build" ||
+ !fs.existsSync(path.resolve(__dirname, "../../../packages/core/src"))
+ ? {}
+ : ({
+ // Comment out the lines below to load a built version of blocknote
+ // or, keep as is to load live from sources with live reload working
+ "@blocknote/core": path.resolve(
+ __dirname,
+ "../../../packages/core/src/",
+ ),
+ "@blocknote/react": path.resolve(
+ __dirname,
+ "../../../packages/react/src/",
+ ),
+ } as any),
+ },
+})) as Parameters[0]);
diff --git a/playground/src/examples.gen.tsx b/playground/src/examples.gen.tsx
index e7b70cb988..d89f453eec 100644
--- a/playground/src/examples.gen.tsx
+++ b/playground/src/examples.gen.tsx
@@ -340,6 +340,40 @@ export const examples = {
readme:
'Switch between Hebrew, Arabic, and Persian to try localized UI and sample content; changing language resets any edits. Use the selected dictionary, Mantine\'s `DirectionProvider`, and `dir="rtl"` on `BlockNoteView` to localize the UI and mirror the layout while keeping code left-to-right. The provider uses `initialDirection="rtl"` and `detectDirection={false}` so this example stays RTL independently of the surrounding playground.\n\n**Try it out!** Edit the nested lists, open a block menu, edit the link, or type `/` and `:sm` in the empty paragraph to try the slash menu and emoji picker.\n\n**Relevant Docs:**\n\n- [Editor Setup](/docs/getting-started/editor-setup)\n- [Localization](/docs/features/localization)\n- [Mantine RTL setup](https://mantine.dev/styles/rtl/)',
},
+ {
+ projectSlug: "kitchen-sink",
+ fullSlug: "basic/kitchen-sink",
+ pathFromRoot: "examples/01-basic/19-kitchen-sink",
+ config: {
+ playground: true,
+ docs: false,
+ author: "BlockNote",
+ tags: ["Testing", "Collaboration"],
+ pro: true,
+ dependencies: {
+ "@blocknote/code-block": "latest",
+ "@blocknote/math-block": "latest",
+ "@blocknote/diagram-block": "latest",
+ "@blocknote/xl-multi-column": "latest",
+ "@blocknote/xl-pdf-exporter": "latest",
+ "@blocknote/xl-typst-compiler": "latest",
+ "@y/prosemirror": "^2.0.0-15",
+ "@y/protocols": "^1.0.6-rc.1",
+ "@y/websocket": "^4.0.0-3",
+ "@y/y": "^14.0.0-rc.26",
+ } as any,
+ devDependencies: {
+ typescript: "^7.0.2",
+ },
+ },
+ title: "Kitchen sink",
+ group: {
+ pathFromRoot: "examples/01-basic",
+ slug: "basic",
+ },
+ readme:
+ "This example brings together BlockNote's blocks, text markup, math, diagrams, tables, and columns for manual testing.\nUse the sidebar to switch documents, change appearance, download PDFs, or open the same room URL in another browser or device to try collaborative editing and floating comments through YHub.",
+ },
{
projectSlug: "testing",
fullSlug: "basic/testing",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d17118a0b3..0c966c9217 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -1089,6 +1089,76 @@ importers:
specifier: ^8.0.0
version: 8.0.8(@types/node@25.9.5)(esbuild@0.27.5)(jiti@2.7.0)(terser@5.51.2)(tsx@4.21.0)(yaml@2.9.0)
+ examples/01-basic/19-kitchen-sink:
+ dependencies:
+ '@blocknote/code-block':
+ specifier: latest
+ version: link:../../../packages/code-block
+ '@blocknote/core':
+ specifier: latest
+ version: link:../../../packages/core
+ '@blocknote/diagram-block':
+ specifier: latest
+ version: link:../../../packages/diagram-block
+ '@blocknote/mantine':
+ specifier: latest
+ version: link:../../../packages/mantine
+ '@blocknote/math-block':
+ specifier: latest
+ version: link:../../../packages/math-block
+ '@blocknote/react':
+ specifier: latest
+ version: link:../../../packages/react
+ '@blocknote/xl-multi-column':
+ specifier: latest
+ version: link:../../../packages/xl-multi-column
+ '@blocknote/xl-pdf-exporter':
+ specifier: latest
+ version: link:../../../packages/xl-pdf-exporter
+ '@blocknote/xl-typst-compiler':
+ specifier: latest
+ version: link:../../../packages/xl-typst-compiler
+ '@mantine/core':
+ specifier: ^9.0.2
+ version: 9.1.1(@mantine/hooks@9.1.1(react@19.2.5))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)
+ '@mantine/hooks':
+ specifier: ^9.0.2
+ version: 9.1.1(react@19.2.5)
+ '@y/prosemirror':
+ specifier: 2.0.0-15
+ version: 2.0.0-15(@y/protocols@1.0.6-rc.1(@y/y@14.0.0-rc.26))(prosemirror-model@1.25.13)(prosemirror-state@1.4.4)(prosemirror-transform@1.12.7)(prosemirror-view@1.44.0)
+ '@y/protocols':
+ specifier: ^1.0.6-rc.1
+ version: 1.0.6-rc.1(@y/y@14.0.0-rc.26)
+ '@y/websocket':
+ specifier: ^4.0.0-3
+ version: 4.0.0-rc.2(@y/y@14.0.0-rc.26)
+ '@y/y':
+ specifier: 14.0.0-rc.26
+ version: 14.0.0-rc.26
+ react:
+ specifier: ^19.2.3
+ version: 19.2.5
+ react-dom:
+ specifier: ^19.2.3
+ version: 19.2.5(react@19.2.5)
+ devDependencies:
+ '@types/react':
+ specifier: ^19.2.3
+ version: 19.2.14
+ '@types/react-dom':
+ specifier: ^19.2.3
+ version: 19.2.3(@types/react@19.2.14)
+ '@vitejs/plugin-react':
+ specifier: ^6.0.1
+ version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.8(@types/node@25.9.5)(esbuild@0.27.5)(jiti@2.7.0)(terser@5.51.2)(tsx@4.21.0)(yaml@2.9.1))
+ typescript:
+ specifier: ^7.0.2
+ version: 7.0.2
+ vite:
+ specifier: ^8.0.0
+ version: 8.0.8(@types/node@25.9.5)(esbuild@0.27.5)(jiti@2.7.0)(terser@5.51.2)(tsx@4.21.0)(yaml@2.9.1)
+
examples/01-basic/testing:
dependencies:
'@blocknote/core':