Skip to content

✨(frontend) enable justified text alignment#2294

Draft
ericboucher wants to merge 5 commits into
suitenumerique:mainfrom
ericboucher:add-justify
Draft

✨(frontend) enable justified text alignment#2294
ericboucher wants to merge 5 commits into
suitenumerique:mainfrom
ericboucher:add-justify

Conversation

@ericboucher
Copy link
Copy Markdown

@ericboucher ericboucher commented May 14, 2026

Purpose

Expose justified text alignment in the editor so formal documents match common expectations (e.g. justified body text). Docs is gaining adoption in French administration contexts where official or formal content often expects full justification alongside left / center / right.

We are aware justified text is not always ideal for accessibility (word spacing). We believe usage will stay relatively uncommon for everyday notes; the control remains optional (per block, not a default). For the workflows that need it, having justify available is nonetheless important.

Screenshot 2026-05-14 at 3 40 11 PM Screenshot 2026-05-14 at 3 08 42 PM

Proposal

  • Extend the formatting toolbar with BlockNote’s existing TextAlignButton for justify, alongside left / center / right (minimal surface: reuses @blocknote/react + existing i18n).
  • Document / accept trade-offs:
    • Editor: BlockNote schema already supports justify; default toolbar omitted it—we only surface it.
    • DOCX: upstream @blocknote/xl-docx-exporter historically maps justify to OOXML distribute, which is not the same as standard justified paragraphs (both). We prefer upstream fix or typed overrides long-term over patching minified dist, which is brittle on exporter upgrades—scope any DOCx alignment tweak in this PR or as a follow-up as maintainers prefer.
    • A11y: no change to defaults; justify is opt-in; consider help text later.

External contributions

Thank you for your contribution! 🎉

Please ensure the following items are checked before submitting your pull request:

General requirements

Skip the checkbox below 👇 if you're fixing an issue or adding documentation

  • Before submitting a PR for a new feature I made sure to contact the product manager

CI requirements

  • I made sure that all existing tests are passing
  • I have signed off my commits with git commit --signoff (DCO compliance)
  • I have signed my commits with my SSH or GPG key (git commit -S)
  • My commit messages follow the required format: <gitmoji>(type) title description
  • I have added a changelog entry under ## [Unreleased] section (if noticeable change)

AI requirements

Skip the checkboxes below 👇 If you didn't use AI for your contribution

  • I used AI assistance to produce part or all of this contribution
  • I have read, reviewed, understood and can explain the code I am submitting
  • I can jump in a call or a chat to explain my work to a maintainer

@ericboucher ericboucher changed the title Add justify option to text block ✨(frontend) add justified text alignment May 14, 2026
@ericboucher ericboucher changed the title ✨(frontend) add justified text alignment ✨(frontend) enable justified text alignment May 14, 2026
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