supermemory/apps/web/app/components/editor/plugins/fixed-toolbar-plugin.tsx
2025-01-20 17:50:45 -07:00

17 lines
442 B
TypeScript

'use client';
import { createPlatePlugin } from '@udecode/plate-common/react';
import { FixedToolbar } from '~/components/plate-ui/fixed-toolbar';
import { FixedToolbarButtons } from '~/components/plate-ui/fixed-toolbar-buttons';
export const FixedToolbarPlugin = createPlatePlugin({
key: 'fixed-toolbar',
render: {
beforeEditable: () => (
<FixedToolbar>
<FixedToolbarButtons />
</FixedToolbar>
),
},
});