diff --git a/web/components/content-editor/markdown-editor.tsx b/web/components/content-editor/markdown-editor.tsx index 352b90a..99e1efb 100644 --- a/web/components/content-editor/markdown-editor.tsx +++ b/web/components/content-editor/markdown-editor.tsx @@ -1,6 +1,7 @@ "use client" import { + type ComponentProps, forwardRef, useId, useImperativeHandle, @@ -35,6 +36,8 @@ type MarkdownEditorProps = { height: string } +type MdEditorToolbars = NonNullable["toolbars"]> + export const MarkdownEditor = forwardRef( function MarkdownEditor( { @@ -61,10 +64,10 @@ export const MarkdownEditor = forwardRef () => { const fullscreenToolbar = ( {fullscreen ? ( @@ -112,10 +115,9 @@ export const MarkdownEditor = forwardRef "revoke", "next", showModeSwitch ? 1 : 0, - "=", "preview", "previewOnly", - ], + ] as MdEditorToolbars, [showModeSwitch] )