aboutsummaryrefslogtreecommitdiff
path: root/apps/web/app/components/editor/plugins/delete-plugins.ts
blob: 947137bc5042ecb7e22689e2a3e6c3bafebe83a4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
'use client';

import { HorizontalRulePlugin } from '@udecode/plate-horizontal-rule/react';
import { ImagePlugin, MediaEmbedPlugin } from '@udecode/plate-media/react';
import { DeletePlugin, SelectOnBackspacePlugin } from '@udecode/plate-select';

export const deletePlugins = [
  SelectOnBackspacePlugin.configure({
    options: {
      query: {
        allow: [
          ImagePlugin.key,
          MediaEmbedPlugin.key,
          HorizontalRulePlugin.key,
        ],
      },
    },
  }),
  DeletePlugin,
] as const;