Skip to content

Preserve alignment when pressing Enter to split a line#164

Merged
JohnMcLear merged 1 commit intomainfrom
feature/register-line-attributes
Apr 14, 2026
Merged

Preserve alignment when pressing Enter to split a line#164
JohnMcLear merged 1 commit intomainfrom
feature/register-line-attributes

Conversation

@JohnMcLear
Copy link
Copy Markdown
Member

Summary

Registers align as a line attribute via the new aceRegisterLineAttributes hook (ether/etherpad-lite#7509), so alignment is preserved when pressing Enter:

  • Enter at middle/end of aligned line: new line inherits alignment
  • Enter at start of aligned line: alignment moves down with the text

Backwards compatible — the hook is ignored on Etherpad versions without it.

Test plan

  • Align a line to center, press Enter at end — new line should also be centered
  • Align a line to right, move caret to start, press Enter — empty line above should be left-aligned, text moves down still right-aligned

🤖 Generated with Claude Code

Uses the new aceRegisterLineAttributes hook from etherpad-lite#7509
so alignment is preserved when pressing Enter to split a line.
Backwards compatible — ignored on older Etherpad versions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JohnMcLear JohnMcLear merged commit fe2c16b into main Apr 14, 2026
3 checks passed
@JohnMcLear JohnMcLear deleted the feature/register-line-attributes branch April 14, 2026 11: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