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 packages/core/src/comments/threadstore/ThreadStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export abstract class ThreadStore {
head: number;
anchor: number;
};
yjs: {
yjs?: {
head: any;
anchor: any;
};
Expand Down
6 changes: 0 additions & 6 deletions packages/core/src/editor/BlockNoteEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -587,12 +587,6 @@ export class BlockNoteEditor<
);
}

if (newOptions.comments && !collaborationEnabled) {
throw new Error(
"Comments are only supported when collaboration is enabled, please set the collaboration option"
);
}

const initialContent =
newOptions.initialContent ||
(collaborationEnabled
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/extensions/Comments/CommentMark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export const CommentMark = Mark.create({
excludes: "",
inclusive: false,
keepOnSplit: true,
group: "blocknoteIgnore", // ignore in blocknote json

addAttributes() {
// Return an object with attribute configuration
Expand Down
4 changes: 3 additions & 1 deletion packages/core/src/extensions/Comments/CommentsPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@ export class CommentsPlugin extends EventEmitter<any> {
head: pmSelection.head,
anchor: pmSelection.anchor,
},
yjs: getRelativeSelection(ystate.binding, view.state),
yjs: ystate
? getRelativeSelection(ystate.binding, view.state)
: undefined, // if we're not using yjs
};

await this.threadStore.addThreadToDocument({
Expand Down
Loading