File tree Expand file tree Collapse file tree 4 files changed +4
-9
lines changed Expand file tree Collapse file tree 4 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export abstract class ThreadStore {
2727 head : number ;
2828 anchor : number ;
2929 } ;
30- yjs : {
30+ yjs ? : {
3131 head : any ;
3232 anchor : any ;
3333 } ;
Original file line number Diff line number Diff line change @@ -587,12 +587,6 @@ export class BlockNoteEditor<
587587 ) ;
588588 }
589589
590- if ( newOptions . comments && ! collaborationEnabled ) {
591- throw new Error (
592- "Comments are only supported when collaboration is enabled, please set the collaboration option"
593- ) ;
594- }
595-
596590 const initialContent =
597591 newOptions . initialContent ||
598592 ( collaborationEnabled
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ export const CommentMark = Mark.create({
55 excludes : "" ,
66 inclusive : false ,
77 keepOnSplit : true ,
8- group : "blocknoteIgnore" , // ignore in blocknote json
98
109 addAttributes ( ) {
1110 // Return an object with attribute configuration
Original file line number Diff line number Diff line change @@ -283,7 +283,9 @@ export class CommentsPlugin extends EventEmitter<any> {
283283 head : pmSelection . head ,
284284 anchor : pmSelection . anchor ,
285285 } ,
286- yjs : getRelativeSelection ( ystate . binding , view . state ) ,
286+ yjs : ystate
287+ ? getRelativeSelection ( ystate . binding , view . state )
288+ : undefined , // if we're not using yjs
287289 } ;
288290
289291 await this . threadStore . addThreadToDocument ( {
You can’t perform that action at this time.
0 commit comments