You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I start writing a page which is saved via collaboration, and then I open the same page with editable: false blocknote deletes the whole content. Reproduced via this nextjs component with the latest version:
"use client";
import { BlockNoteEditor } from "@blocknote/core";
import { BlockNoteView, useBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";
import * as Y from 'yjs'
import { HocuspocusProvider } from '@hocuspocus/provider'
export default function Editor() {
const ydoc = new Y.Doc()
const provider = new HocuspocusProvider({
url: "ws://localhost:1234",
name: 'page~~c758cb5d-e8ab-425a-a79d-276711e9b572',
document: ydoc
})
const editor = useBlockNote({
editable: false, // If editable is false it deletes existing content
collaboration: {
provider,
fragment: ydoc.getXmlFragment('document-store'),
user: {
name: 'My Username',
color: '#ff0000'
}
},
});
return <BlockNoteView editor={editor} />;
}
The text was updated successfully, but these errors were encountered:
@matthewlipski I feel bad saying this, but this bug deletes the whole contents with editable: false and collaboration enabled, perhaps it should be prio:high?
If I start writing a page which is saved via collaboration, and then I open the same page with
editable: false
blocknote deletes the whole content. Reproduced via this nextjs component with the latest version:The text was updated successfully, but these errors were encountered: