aboutsummaryrefslogtreecommitdiff
path: root/apps/web/app/components/editor/plugins/comments-plugin.tsx
blob: 6292eed91f0849d336fd2ee1871c7e4cf7127bed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
'use client';

import { CommentsPlugin } from '@udecode/plate-comments/react';

import { CommentsPopover } from '~/components/plate-ui/comments-popover';

export const commentsPlugin = CommentsPlugin.configure({
  options: {
    myUserId: '1',
    users: {
      1: {
        id: '1',
        avatarUrl: 'https://avatars.githubusercontent.com/u/19695832?s=96&v=4',
        name: 'zbeyens',
      },
      2: {
        id: '2',
        avatarUrl: 'https://avatars.githubusercontent.com/u/4272090?v=4',
        name: '12joan',
      },
    },
  },
  render: { afterEditable: () => <CommentsPopover /> },
});