Skip to content

feat(app-core): table cells support the same inline formatting shortcuts as the editor - #603

Open
junereycasuga wants to merge 1 commit into
ZenNotes:mainfrom
junereycasuga:feat/table-inline-format
Open

feat(app-core): table cells support the same inline formatting shortcuts as the editor#603
junereycasuga wants to merge 1 commit into
ZenNotes:mainfrom
junereycasuga:feat/table-inline-format

Conversation

@junereycasuga

Copy link
Copy Markdown
Contributor

What changed

Table cells now support the same inline formatting shortcuts as the main editor:

  • Mod+B → bold **
  • Mod+I → italic *
  • Mod+E → code `
  • Mod+K → link [...](...)
  • Shift+Mod+S → strikethrough ~~
  • Shift+Mod+H → highlight ==
  • Shift+Mod+M → math $

The shortcuts work in both normal contenteditable cells and Vim visual-mode cells.

How it works

  • cm-format.ts now exposes pure-text helpers toggleWrapEdit and wrapLinkEdit, which compute the same wrap/unwrap logic used by the editor.
  • cm-table.ts applies those helpers directly to the cell source and updates the cell caret.
  • VimNav now returns early when focus is inside a .cm-table-widget, so the global editor-level formatting chords don’t steal the shortcut from the cell.

Tests

Added coverage for all seven shortcuts in table cells, plus a Vim visual-selection + Mod+B case.

Verification

  • npx vitest run src/lib/cm-format.test.ts src/lib/cm-table.test.ts — 78/78 tests pass
  • npx tsc --noEmit -p tsconfig.json — clean

@junereycasuga
junereycasuga force-pushed the feat/table-inline-format branch from eecbb69 to e0a6e26 Compare August 18, 2026 13:51
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