Add a spacer block to the page editor (#73) #76

Merged
miko merged 1 commit from feature/73-spacer into development 2026-11-04 13:12:46 +01:00
Owner

Closes #73.

Admins add empty vertical space to a page's content, 1 to 20 rem in whole rem, also in a column. The height is typed into the block's field or set by dragging its bottom edge, which snaps to 1rem; the focused handle is a slider for the arrow keys. Read, the space between a spacer's neighbours is its height alone.

  • Format: {type: "spacer", data: {height}}; the parser rounds and clamps the height and drops a spacer without a number (ADR 0005).
  • The tool keeps its number field in a shadow root, so Editor.js sees a block without text (otherwise inserting throws and leaves the toolbox open).
  • Columns and the spacer share containEvents.

Tests: unit (368) and e2e (39) pass.

🤖 Generated with Claude Code

Closes #73. Admins add empty vertical space to a page's content, 1 to 20 rem in whole rem, also in a column. The height is typed into the block's field or set by dragging its bottom edge, which snaps to 1rem; the focused handle is a slider for the arrow keys. Read, the space between a spacer's neighbours is its height alone. - Format: `{type: "spacer", data: {height}}`; the parser rounds and clamps the height and drops a spacer without a number (ADR 0005). - The tool keeps its number field in a shadow root, so Editor.js sees a block without text (otherwise inserting throws and leaves the toolbox open). - Columns and the spacer share `containEvents`. Tests: unit (368) and e2e (39) pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Admins add empty vertical space to a page's content, 1 to 20 rem high
in whole rem, also in a column. The height is typed into the block's
field or set by dragging its bottom edge, which snaps to 1rem; focused,
the handle is a slider for the arrow keys. Read, the space between a
spacer's neighbours is its height alone, without the blocks' usual gap.

The format stores {type: "spacer", data: {height}}; the parser rounds
and clamps the height and drops a spacer without a number. The tool
keeps its number field in a shadow root, so Editor.js sees a block
without text: it would put the caret into a number field, which throws,
and leave the toolbox open. Columns and the spacer share one helper that
keeps keys, paste, copy, cut and drop inside an element.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
miko merged commit e31817fc8e into development 2026-11-04 13:12:46 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MassiveDynamic/kataba!76
No description provided.