diff --git a/frontend/src/components/shared/markdown-editor.tsx b/frontend/src/components/shared/markdown-editor.tsx index 46efe9ef..d2f129d7 100644 --- a/frontend/src/components/shared/markdown-editor.tsx +++ b/frontend/src/components/shared/markdown-editor.tsx @@ -42,10 +42,10 @@ export interface MarkdownEditorProps { className?: string; contentClassName?: string; disabled?: boolean; + hasToolbar?: boolean; onBlur?: () => void; onChange: (value: string) => void; placeholder?: string; - showToolbar?: boolean; value: string; } @@ -94,11 +94,11 @@ function MarkdownEditor({ className, contentClassName, disabled, + hasToolbar = true, onBlur, onChange, placeholder = 'Write something…', ref, - showToolbar = true, value, }: MarkdownEditorProps & { ref?: Ref }) { // Suppress echoes of our own output: the markdown round-trip re-serializes slightly (whitespace/list @@ -281,7 +281,7 @@ function MarkdownEditor({ )} data-slot="markdown-editor" > - {showToolbar ? ( + {hasToolbar ? ( ; /** When `true`, the editor stretches to fill its parent (desktop split view). */ fillParent?: boolean; + hasLabel?: boolean; isSaving: boolean; - showLabel?: boolean; /** 'visual' (default) = rich MarkdownEditor; 'plain' = raw-markdown textarea. */ viewMode?: 'plain' | 'visual'; } @@ -89,8 +89,8 @@ interface KnowledgeMetaFieldsProps { export function KnowledgeContentField({ control, fillParent = false, + hasLabel = false, isSaving, - showLabel = false, viewMode = 'visual', }: KnowledgeContentFieldProps) { return ( @@ -99,7 +99,7 @@ export function KnowledgeContentField({ name="content" render={({ field }) => ( - {showLabel ? Content : null} + {hasLabel ? Content : null} {viewMode === 'plain' ? (