Skip to content

fix(editor): support line breaks in visual table cells - #632

Merged
murongg merged 1 commit into
v2from
fix/visual-table-line-breaks
Aug 1, 2026
Merged

fix(editor): support line breaks in visual table cells#632
murongg merged 1 commit into
v2from
fix/visual-table-line-breaks

Conversation

@murongg

@murongg murongg commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • let Shift+Enter insert a persisted <br> in visual table cells while keeping focus on the new visual line
  • preserve the existing plain Enter behavior that finishes cell editing
  • distinguish authored line breaks from browser-owned empty-cell placeholders, including a cell whose only content is <br>

Why

Visual table cells handled every Enter keypress as a request to leave editing, so the existing source-mode Shift+Enter behavior was unavailable in preview mode. This predates and is independent of #630.

Validation

  • pnpm --filter @markra/editor test — 33 files, 387 tests passed
  • pnpm --filter @markra/app test -- MarkdownExportDocument.test.tsx — 9 tests passed
  • pnpm --filter @markra/editor build — passed
  • pnpm --filter @markra/editor typecheck:test — passed
  • git diff --check — passed
  • browser QA: inserted a line break, continued typing on the next visual line, and confirmed the source became First<br>Second

Risk

  • scoped to Enter handling and exact <br> rendering/serialization inside visual table cells
  • non-break HTML remains literal, and plain Enter behavior is unchanged

@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
markra-web Ready Ready Preview Aug 1, 2026 4:35pm

@murongg
murongg merged commit 3056b20 into v2 Aug 1, 2026
21 checks passed
@murongg
murongg deleted the fix/visual-table-line-breaks branch August 1, 2026 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant