aboutsummaryrefslogtreecommitdiff
path: root/apps/web/app/components/editor/plugins/fixed-toolbar-plugin.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/app/components/editor/plugins/fixed-toolbar-plugin.tsx')
-rw-r--r--apps/web/app/components/editor/plugins/fixed-toolbar-plugin.tsx17
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/web/app/components/editor/plugins/fixed-toolbar-plugin.tsx b/apps/web/app/components/editor/plugins/fixed-toolbar-plugin.tsx
new file mode 100644
index 00000000..b77d6c75
--- /dev/null
+++ b/apps/web/app/components/editor/plugins/fixed-toolbar-plugin.tsx
@@ -0,0 +1,17 @@
+'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>
+ ),
+ },
+});