Skip to content

Feature request: support editing Notion simple tables (HTML table blocks) #34

Description

@krodak

Problem

When a page contains Notion simple tables (not database views), they are rendered as HTML <table> blocks in notion read output. The current --find/--replace mechanism in edit-page cannot reliably edit individual cells or rows within these tables.

Current behavior

  1. notion read outputs tables as HTML:
<table header-row="true">
<tr><td>Model</td><td>Price</td></tr>
<tr><td>Osprey Exos 48</td><td>738 zl</td></tr>
</table>
  1. --find/--replace with text from inside a table cell fails with "No matches found" because the find operates on markdown-level blocks, not inside HTML table content.

  2. The only workaround is edit-page --allow-deleting-content -m "..." which replaces the entire page — losing any inline databases, views, or manually arranged content.

Expected behavior

One or more of:

  • Option A: --find/--replace should be able to match text inside HTML table cells
  • Option B: A dedicated edit-table or table command that can:
    • Add/remove rows
    • Edit specific cells by row/column index or content match
    • Insert a row after a matched row
  • Option C: notion read outputs tables as markdown tables (pipes |) instead of HTML, making --find/--replace work naturally

Use case

Building comparison tables (gear reviews, product comparisons) via CLI where you need to:

  • Add a new row to an existing table
  • Update a price in a specific cell
  • Remove a discontinued product row

Currently the only reliable approach is rewriting the entire page on every change, which destroys any content the user has manually arranged (inline DB views, drag-and-dropped blocks, etc.).

Environment

  • notion-cli v0.13.0
  • Notion API 2022-06-28

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