'use client' import { useNoteEditorContext } from './note-editor-context' import { RichTextEditor } from '@/components/rich-text-editor' import { MarkdownContent } from '@/components/markdown-content' import { MarkdownSlashCommands } from '@/components/markdown-slash-commands' import { GhostTags } from '@/components/ghost-tags' import { Textarea } from '@/components/ui/textarea' import { Input } from '@/components/ui/input' import { Button } from '@/components/ui/button' import { Checkbox } from '@/components/ui/checkbox' import { X, Plus } from 'lucide-react' import { useLanguage } from '@/lib/i18n' import { cn } from '@/lib/utils' import { InlinePaywall } from '@/components/settings/inline-paywall' export function NoteContentArea() { const { state, actions, readOnly, fullPage, textareaRef, note, richTextEditorRef } = useNoteEditorContext() const { t } = useLanguage() const uploadImageFile = async (file: File) => { const formData = new FormData() formData.append('file', file) const response = await fetch('/api/upload', { method: 'POST', body: formData }) if (!response.ok) throw new Error('Upload failed') const data = await response.json() return data.url } // Markdown preview mode if (state.isMarkdown && state.showMarkdownPreview) { return (
Cliquez pour éditer
)}