Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
17 changes: 10 additions & 7 deletions docs/app/demo/_components/DemoEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
CommentsExtension,
DefaultThreadStoreAuth,
} from "@blocknote/core/comments";
import { YjsThreadStore } from "@blocknote/core/yjs";
import { YjsThreadStore, withCollaboration } from "@blocknote/core/yjs";
import { filterSuggestionItems } from "@blocknote/core/extensions";
import "@blocknote/core/fonts/inter.css";
import * as locales from "@blocknote/core/locales";
Expand Down Expand Up @@ -52,7 +52,7 @@ import { pdf } from "@react-pdf/renderer";
import { DefaultChatTransport } from "ai";
import { useTheme } from "next-themes";
import { useEffect, useMemo, useState } from "react";
import YPartyKitProvider from "y-partykit/provider";
import { WebsocketProvider } from "y-websocket";
import * as Y from "yjs";
import { EditorMenu } from "./EditorMenu";
import { HARDCODED_USERS, resolveUsers, uploadFile } from "./utils";
Expand All @@ -65,6 +65,9 @@ const BASE_URL =

const AI_API_URL = `${BASE_URL}/regular/streamText`;

const YHUB_HOST = "yhub.teleportal.tools";
const YHUB_ORG = "blocknote";

// Formatting toolbar with AI button
function FormattingToolbarWithAI() {
return (
Expand Down Expand Up @@ -196,9 +199,9 @@ function DemoEditorInner({

const { doc, provider } = useMemo(() => {
const doc = new Y.Doc();
const provider = new YPartyKitProvider(
"blocknote-dev.yousefed.partykit.dev",
"demo-" + roomId,
const provider = new WebsocketProvider(
`wss://${YHUB_HOST}/api/ws/v1`,
`${YHUB_ORG}/demo-${roomId}`,
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
doc,
);
return { doc, provider };
Expand All @@ -214,7 +217,7 @@ function DemoEditorInner({
}, [activeUser, doc]);

const editor = useCreateBlockNote(
{
withCollaboration({
// Schema with MultiColumn & PageBreak
// schema: withMultiColumn(withPageBreak(BlockNoteSchema.create())),
// dropCursor: multiColumnDropCursor,
Expand Down Expand Up @@ -249,7 +252,7 @@ function DemoEditorInner({
],

uploadFile,
},
}),
[activeUser, threadStore, provider, doc],
);

Expand Down
1 change: 0 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@
"shiki": "^4.4.3",
"tailwind-merge": "^3.4.0",
"typescript-5": "npm:typescript@^5.9.3",
"y-partykit": "^0.0.25",
"y-websocket": "^2.1.0",
"yjs": "^13.6.27",
"zod": "^4.3.5"
Expand Down
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading