Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,4 @@
"tw-animate-css": "^1.4.0",
"typescript": "^5.9.3"
}
}
}
4 changes: 2 additions & 2 deletions examples/01-basic/03-multi-column/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
"@blocknote/mantine": "latest",
"@blocknote/react": "latest",
"@blocknote/shadcn": "latest",
"@blocknote/xl-multi-column": "latest",
"@mantine/core": "^8.3.11",
"@mantine/hooks": "^8.3.11",
"@mantine/utils": "^6.0.22",
"react": "^19.2.3",
"react-dom": "^19.2.3"
"react-dom": "^19.2.3",
"@blocknote/xl-multi-column": "latest"
},
"devDependencies": {
"@types/react": "^19.2.3",
Expand Down
6 changes: 3 additions & 3 deletions examples/02-backend/03-s3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
"preview": "vite preview"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.609.0",
"@aws-sdk/s3-request-presigner": "^3.609.0",
"@blocknote/ariakit": "latest",
"@blocknote/core": "latest",
"@blocknote/mantine": "latest",
Expand All @@ -22,7 +20,9 @@
"@mantine/hooks": "^8.3.11",
"@mantine/utils": "^6.0.22",
"react": "^19.2.3",
"react-dom": "^19.2.3"
"react-dom": "^19.2.3",
"@aws-sdk/client-s3": "^3.609.0",
"@aws-sdk/s3-request-presigner": "^3.609.0"
},
"devDependencies": {
"@types/react": "^19.2.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
"@blocknote/core": "latest",
"@blocknote/mantine": "latest",
"@blocknote/react": "latest",
"@blocknote/server-util": "latest",
"@blocknote/shadcn": "latest",
"@mantine/core": "^8.3.11",
"@mantine/hooks": "^8.3.11",
"@mantine/utils": "^6.0.22",
"react": "^19.2.3",
"react-dom": "^19.2.3"
"react-dom": "^19.2.3",
"@blocknote/server-util": "latest"
},
"devDependencies": {
"@types/react": "^19.2.3",
Expand Down
4 changes: 2 additions & 2 deletions examples/03-ui-components/11-uppy-file-panel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"@mantine/core": "^8.3.11",
"@mantine/hooks": "^8.3.11",
"@mantine/utils": "^6.0.22",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"@uppy/core": "^3.13.1",
"@uppy/dashboard": "^3.9.1",
"@uppy/drag-drop": "^3.1.1",
Expand All @@ -30,8 +32,6 @@
"@uppy/status-bar": "^3.1.1",
"@uppy/webcam": "^3.4.2",
"@uppy/xhr-upload": "^3.4.0",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"react-icons": "^5.5.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions examples/03-ui-components/13-custom-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
"@mantine/core": "^8.3.11",
"@mantine/hooks": "^8.3.11",
"@mantine/utils": "^6.0.22",
"@mui/icons-material": "^5.16.1",
"@mui/material": "^5.16.1",
"react": "^19.2.3",
"react-dom": "^19.2.3"
"react-dom": "^19.2.3",
"@mui/icons-material": "^5.16.1",
"@mui/material": "^5.16.1"
},
"devDependencies": {
"@types/react": "^19.2.3",
Expand Down
4 changes: 2 additions & 2 deletions examples/04-theming/06-code-block/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
},
"dependencies": {
"@blocknote/ariakit": "latest",
"@blocknote/code-block": "latest",
"@blocknote/core": "latest",
"@blocknote/mantine": "latest",
"@blocknote/react": "latest",
Expand All @@ -21,7 +20,8 @@
"@mantine/hooks": "^8.3.11",
"@mantine/utils": "^6.0.22",
"react": "^19.2.3",
"react-dom": "^19.2.3"
"react-dom": "^19.2.3",
"@blocknote/code-block": "latest"
},
"devDependencies": {
"@types/react": "^19.2.3",
Expand Down
10 changes: 5 additions & 5 deletions examples/04-theming/07-custom-code-block/.bnexample.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"tags": ["Basic"],
"dependencies": {
"@blocknote/code-block": "latest",
"@shikijs/core": "^3.19.0",
"@shikijs/engine-javascript": "^3.19.0",
"@shikijs/langs-precompiled": "^3.19.0",
"@shikijs/themes": "^3.19.0",
"@shikijs/types": "^3.19.0"
"@shikijs/core": "^4",
"@shikijs/engine-javascript": "^4",
"@shikijs/langs-precompiled": "^4",
"@shikijs/themes": "^4",
"@shikijs/types": "^4"
}
}
10 changes: 5 additions & 5 deletions examples/04-theming/07-custom-code-block/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@
},
"dependencies": {
"@blocknote/ariakit": "latest",
"@blocknote/code-block": "latest",
"@blocknote/core": "latest",
"@blocknote/mantine": "latest",
"@blocknote/react": "latest",
"@blocknote/shadcn": "latest",
"@mantine/core": "^8.3.11",
"@mantine/hooks": "^8.3.11",
"@mantine/utils": "^6.0.22",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"@blocknote/code-block": "latest",
"@shikijs/core": "^4",
"@shikijs/engine-javascript": "^4",
"@shikijs/langs-precompiled": "^4",
"@shikijs/themes": "^4",
"@shikijs/types": "^4",
"react": "^19.2.3",
"react-dom": "^19.2.3"
"@shikijs/types": "^4"
},
"devDependencies": {
"@types/react": "^19.2.3",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^6.0.1",
"vite": "^8.0.8"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
"@blocknote/mantine": "latest",
"@blocknote/react": "latest",
"@blocknote/shadcn": "latest",
"@blocknote/xl-multi-column": "latest",
"@blocknote/xl-pdf-exporter": "latest",
"@mantine/core": "^8.3.11",
"@mantine/hooks": "^8.3.11",
"@mantine/utils": "^6.0.22",
"@react-pdf/renderer": "^4.3.0",
"react": "^19.2.3",
"react-dom": "^19.2.3"
"react-dom": "^19.2.3",
"@blocknote/xl-pdf-exporter": "latest",
"@blocknote/xl-multi-column": "latest",
"@react-pdf/renderer": "^4.3.0"
},
"devDependencies": {
"@types/react": "^19.2.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
"@blocknote/mantine": "latest",
"@blocknote/react": "latest",
"@blocknote/shadcn": "latest",
"@blocknote/xl-docx-exporter": "latest",
"@blocknote/xl-multi-column": "latest",
"@mantine/core": "^8.3.11",
"@mantine/hooks": "^8.3.11",
"@mantine/utils": "^6.0.22",
"react": "^19.2.3",
"react-dom": "^19.2.3"
"react-dom": "^19.2.3",
"@blocknote/xl-docx-exporter": "latest",
"@blocknote/xl-multi-column": "latest"
},
"devDependencies": {
"@types/react": "^19.2.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
"@blocknote/mantine": "latest",
"@blocknote/react": "latest",
"@blocknote/shadcn": "latest",
"@blocknote/xl-multi-column": "latest",
"@blocknote/xl-odt-exporter": "latest",
"@mantine/core": "^8.3.11",
"@mantine/hooks": "^8.3.11",
"@mantine/utils": "^6.0.22",
"react": "^19.2.3",
"react-dom": "^19.2.3"
"react-dom": "^19.2.3",
"@blocknote/xl-odt-exporter": "latest",
"@blocknote/xl-multi-column": "latest"
},
"devDependencies": {
"@types/react": "^19.2.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
"@blocknote/mantine": "latest",
"@blocknote/react": "latest",
"@blocknote/shadcn": "latest",
"@blocknote/xl-email-exporter": "latest",
"@mantine/core": "^8.3.11",
"@mantine/hooks": "^8.3.11",
"@mantine/utils": "^6.0.22",
"@react-email/render": "^2.0.4",
"react": "^19.2.3",
"react-dom": "^19.2.3"
"react-dom": "^19.2.3",
"@blocknote/xl-email-exporter": "latest",
"@react-email/render": "^2.0.4"
},
"devDependencies": {
"@types/react": "^19.2.3",
Expand Down
10 changes: 5 additions & 5 deletions examples/07-collaboration/02-liveblocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
"@blocknote/mantine": "latest",
"@blocknote/react": "latest",
"@blocknote/shadcn": "latest",
"@liveblocks/client": "^3.17.0",
"@liveblocks/react": "^3.17.0",
"@liveblocks/react-blocknote": "^3.17.0",
"@liveblocks/react-tiptap": "^3.17.0",
"@liveblocks/react-ui": "^3.17.0",
"@mantine/core": "^8.3.11",
"@mantine/hooks": "^8.3.11",
"@mantine/utils": "^6.0.22",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"@liveblocks/client": "^3.17.0",
"@liveblocks/react": "^3.17.0",
"@liveblocks/react-blocknote": "^3.17.0",
"@liveblocks/react-tiptap": "^3.17.0",
"@liveblocks/react-ui": "^3.17.0",
"yjs": "^13.6.27"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/07-collaboration/03-y-sweet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"@mantine/core": "^8.3.11",
"@mantine/hooks": "^8.3.11",
"@mantine/utils": "^6.0.22",
"@y-sweet/react": "^0.6.3",
"react": "^19.2.3",
"react-dom": "^19.2.3"
"react-dom": "^19.2.3",
"@y-sweet/react": "^0.6.3"
},
"devDependencies": {
"@types/react": "^19.2.3",
Expand Down
4 changes: 2 additions & 2 deletions examples/07-collaboration/05-comments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"@mantine/core": "^8.3.11",
"@mantine/hooks": "^8.3.11",
"@mantine/utils": "^6.0.22",
"@y-sweet/react": "^0.6.3",
"react": "^19.2.3",
"react-dom": "^19.2.3"
"react-dom": "^19.2.3",
"@y-sweet/react": "^0.6.3"
},
"devDependencies": {
"@types/react": "^19.2.3",
Expand Down
9 changes: 9 additions & 0 deletions examples/07-collaboration/09-comments-testing/.bnexample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"playground": true,
"docs": false,
"author": "matthewlipski",
"tags": ["Advanced", "Comments", "Testing"],
"dependencies": {
"yjs": "^13.6.27"
}
}
3 changes: 3 additions & 0 deletions examples/07-collaboration/09-comments-testing/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Comments Testing

A minimal comments example used for end-to-end testing. Uses a local Y.Doc (no collaboration provider) with a single hardcoded editor user.
14 changes: 14 additions & 0 deletions examples/07-collaboration/09-comments-testing/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<html lang="en">
Comment thread
matthewlipski marked this conversation as resolved.
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Comments Testing</title>
<script>
<!-- AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY -->
</script>
</head>
<body>
<div id="root"></div>
<script type="module" src="./main.tsx"></script>
</body>
</html>
11 changes: 11 additions & 0 deletions examples/07-collaboration/09-comments-testing/main.tsx
Original file line number Diff line number Diff line change
@@ -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(
<React.StrictMode>
<App />
</React.StrictMode>
);
32 changes: 32 additions & 0 deletions examples/07-collaboration/09-comments-testing/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "@blocknote/example-collaboration-comments-testing",
"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/ariakit": "latest",
"@blocknote/core": "latest",
"@blocknote/mantine": "latest",
"@blocknote/react": "latest",
"@blocknote/shadcn": "latest",
"@mantine/core": "^8.3.11",
"@mantine/hooks": "^8.3.11",
"@mantine/utils": "^6.0.22",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"yjs": "^13.6.27"
},
"devDependencies": {
"@types/react": "^19.2.3",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^6.0.1",
"vite": "^8.0.8"
}
}
44 changes: 44 additions & 0 deletions examples/07-collaboration/09-comments-testing/src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
"use client";

import {
CommentsExtension,
DefaultThreadStoreAuth,
YjsThreadStore,
} from "@blocknote/core/comments";
import { BlockNoteView } from "@blocknote/mantine";
import "@blocknote/mantine/style.css";
import { useCreateBlockNote } from "@blocknote/react";
import { useMemo } from "react";
import * as Y from "yjs";

const USER = {
id: "1",
username: "John Doe",
avatarUrl: "https://placehold.co/100x100?text=John",
role: "editor" as const,
Comment thread
matthewlipski marked this conversation as resolved.
};

async function resolveUsers(userIds: string[]) {
return [USER].filter((user) => userIds.includes(user.id));
}

export default function App() {
const doc = useMemo(() => new Y.Doc(), []);

const threadStore = useMemo(() => {
return new YjsThreadStore(
USER.id,
doc.getMap("threads"),
new DefaultThreadStoreAuth(USER.id, USER.role),
);
}, [doc]);

const editor = useCreateBlockNote(
{
extensions: [CommentsExtension({ threadStore, resolveUsers })],
},
[threadStore],
);

return <BlockNoteView editor={editor} />;
}
Loading
Loading