Skip to content

feat: Convert Markdown tables to databases #832

Description

@junereycasuga

Problem & Motivation

Currently, ZenNotes supports both standard Markdown tables within notes and standalone Notion-style CSV databases (table/board views over .csv files).

Often, a note begins with a simple inline Markdown table that outgrows basic editing. Manually copying, formatting, and re-exporting Markdown pipe syntax into a .csv file in the vault to unlock sorting, filtering, and board views disrupts the keyboard-first flow.

Proposed Solution

Add an action to convert any existing Markdown table directly into a ZenNotes CSV database.

Desired UX / Workflow

  1. Trigger Options:
    • Context Menu / Hover Affordance: A "Convert to Database" option on the table header or action menu.
    • Command Palette / Ex Command: A command like Convert Table Under Cursor to Database or :table-to-db.
  2. Creation Flow:
    • Prompts the user for a database name (defaulting to the preceding heading or <note-name>-table.csv).
    • Parses the Markdown table rows and columns.
    • Creates the corresponding .csv file in the vault (or a dedicated folder).
    • Replaces the raw Markdown table in the note with either:
      • An embedded link/reference to the new database.
      • An inline database view block.

Handling Edge Cases

  • Empty cells: Converted to empty CSV fields "".
  • Commas/quotes inside cells: Appropriately escaped according to standard RFC 4180 CSV specifications.
  • Inline Markdown (links, tags, formatting): Preserved as text inside the CSV values.

Alternatives Considered

  • Copying the table and using an external Markdown-to-CSV converter, then importing it back into the vault. This breaks the local, keyboard-first editing experience.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions