diff --git a/memento-note/components/note-editor.tsx b/memento-note/components/note-editor.tsx index 10aae94..d996c8a 100644 --- a/memento-note/components/note-editor.tsx +++ b/memento-note/components/note-editor.tsx @@ -258,6 +258,14 @@ export function NoteEditor({ note, readOnly = false, onClose, fullPage = false } return () => document.removeEventListener('paste', handlePaste, { capture: true } as any) }, [t]) + // Auto-grow textarea as content grows + useEffect(() => { + const el = textareaRef.current + if (!el) return + el.style.height = 'auto' + el.style.height = Math.max(el.scrollHeight, 280) + 'px' + }, [content]) + const handleRemoveImage = (index: number) => { const removedUrl = images[index] setImages(images.filter((_, i) => i !== index)) @@ -700,6 +708,23 @@ export function NoteEditor({ note, readOnly = false, onClose, fullPage = false } compact /> + {/* Preview toggle — only for text/markdown, in toolbar where it's visible */} + {(noteType === 'text' || noteType === 'markdown') && !readOnly && ( + + )} + {/* AI — rounded-full, exact prototype style */}