File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -205,12 +205,15 @@ export class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockSchema> {
205205
206206 this . schema = newOptions . blockSchema ;
207207
208- const initialContent = newOptions . initialContent || [
209- {
210- type : "paragraph" ,
211- id : UniqueID . options . generateID ( ) ,
212- } ,
213- ] ;
208+ const initialContent =
209+ newOptions . initialContent || options . collaboration
210+ ? undefined
211+ : [
212+ {
213+ type : "paragraph" ,
214+ id : UniqueID . options . generateID ( ) ,
215+ } ,
216+ ] ;
214217
215218 const tiptapOptions : EditorOptions = {
216219 ...blockNoteTipTapOptions ,
@@ -220,6 +223,10 @@ export class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockSchema> {
220223 this . ready = true ;
221224 } ,
222225 onBeforeCreate ( editor ) {
226+ if ( ! initialContent ) {
227+ // when using collaboration
228+ return ;
229+ }
223230 // we have to set the initial content here, because now we can use the editor schema
224231 // which has been created at this point
225232 const schema = editor . editor . schema ;
You can’t perform that action at this time.
0 commit comments