memos/web
Cursor Agent f95e4452a5 feat: add table editor dialog for visual table editing
Add a dialog-based table editor that makes creating and editing markdown
tables much easier than manipulating raw pipe-delimited text.

Features:
- Visual grid of input fields for editing headers and cells
- Add and remove rows and columns
- Sort columns ascending/descending (supports both text and numeric)
- Tab key navigation between cells (auto-creates new rows at the end)
- Properly formatted/aligned markdown output on confirm
- Row numbers with hover-to-delete interaction
- Column sort indicators and remove buttons

Integration points:
1. Toolbar: New 'Table' button in the InsertMenu (+) dropdown opens the
   dialog for creating new tables from the editor
2. Slash command: /table now opens the dialog instead of inserting raw
   markdown, via new Command.action callback support
3. Rendered tables: Edit pencil icon appears on hover over rendered tables
   in MemoContent, opens dialog pre-populated with parsed table data,
   and saves changes directly via updateMemo mutation (same pattern as
   TaskListItem checkbox toggling)

New files:
- utils/markdown-table.ts: Parse, serialize, find/replace markdown tables
- components/TableEditorDialog.tsx: Reusable table editor dialog component

Modified:
- Extended Command interface with optional action callback for dialogs
- SlashCommands handles action-based commands (skips text insertion)
- Editor accepts custom commands via props
- EditorContent creates commands with table editor wired in
- MemoEditor manages table dialog state shared between slash cmd and toolbar
- InsertMenu includes Table entry and its own dialog for toolbar flow
- Table.tsx (MemoContent) adds edit button and dialog for rendered tables

Co-authored-by: milvasic <milvasic@users.noreply.github.com>
2026-02-06 22:44:15 +00:00
..
docs refactor(react-query): optimize config, add error boundary, and remove JSDoc 2025-12-25 08:47:36 +08:00
public chore: enhance site.webmanifest in firefox (#4828) 2025-07-08 19:56:46 +08:00
src feat: add table editor dialog for visual table editing 2026-02-06 22:44:15 +00:00
.gitignore chore: update gitignore 2025-04-17 23:11:36 +08:00
biome.json refactor: remove MemoContentContext and integrate MemoViewContext 2025-12-28 12:46:12 +08:00
components.json feat: themes (#4824) 2025-07-07 20:13:22 +08:00
index.html chore: prevent sensitive data caching 2025-12-20 12:33:16 +08:00
package.json fix: KaTeX math rendering with underscores (#5438) 2026-01-06 20:16:01 +08:00
pnpm-lock.yaml fix: KaTeX math rendering with underscores (#5438) 2026-01-06 20:16:01 +08:00
tsconfig.json chore: clean up unused imports and parameters across components 2025-12-27 10:18:38 +08:00
vite.config.mts feat: add live memo refresh via Server-Sent Events (SSE) 2026-02-06 21:18:21 +00:00