+ {editor &&
+ (
+
+
- {showCommentPopup && (
-
- )}
- >
+ {showCommentPopup && (
+
+ )}
+
)}
+
);
}
+
diff --git a/client/src/features/editor/extensions.ts b/client/src/features/editor/extensions.ts
index 54f558c0..624f5d88 100644
--- a/client/src/features/editor/extensions.ts
+++ b/client/src/features/editor/extensions.ts
@@ -16,6 +16,7 @@ import { Color } from '@tiptap/extension-color';
import SlashCommand from '@/features/editor/extensions/slash-command';
import { Collaboration } from '@tiptap/extension-collaboration';
import { CollaborationCursor } from '@tiptap/extension-collaboration-cursor';
+import { Comment } from '@/features/editor/extensions/comment/comment';
import * as Y from 'yjs';
export const mainExtensions = [
@@ -47,6 +48,11 @@ export const mainExtensions = [
TextStyle,
Color,
SlashCommand,
+ Comment.configure({
+ HTMLAttributes: {
+ class: 'comment-mark',
+ },
+ }),
];
type CollabExtensions = (ydoc: Y.Doc, provider: any) => any[];
diff --git a/client/src/features/editor/extensions/comment/comment.ts b/client/src/features/editor/extensions/comment/comment.ts
index d14ab354..fbb7b457 100644
--- a/client/src/features/editor/extensions/comment/comment.ts
+++ b/client/src/features/editor/extensions/comment/comment.ts
@@ -127,6 +127,7 @@ export const Comment = Mark.create