✨(frontend) enable justified text alignment#2294
Draft
ericboucher wants to merge 5 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Proposal
TextAlignButtonforjustify, alongside left / center / right (minimal surface: reuses@blocknote/react+ existing i18n).justify; default toolbar omitted it—we only surface it.@blocknote/xl-docx-exporterhistorically maps justify to OOXMLdistribute, which is not the same as standard justified paragraphs (both). We prefer upstream fix or typed overrides long-term over patching minifieddist, which is brittle on exporter upgrades—scope any DOCx alignment tweak in this PR or as a follow-up as maintainers prefer.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
CI requirements
git commit --signoff(DCO compliance)git commit -S)<gitmoji>(type) title description## [Unreleased]section (if noticeable change)AI requirements
Skip the checkboxes below 👇 If you didn't use AI for your contribution