Skip to content

Feature: native LTR/RTL paragraph direction toggle #3219

@shri-scale

Description

@shri-scale

Backend support for paragraph direction (pPr.rightToLeft, <w:bidi> round-trip, Document API format.paragraph.setDirection) already exists. The toolbar and editor don't expose it.

Add:

  • setParagraphDirection / clearParagraphDirection PM commands on the paragraph extension (multi-paragraph, single transaction, optional alignmentPolicy: "matchDirection" to flip leftright justification).
  • Two default toolbar buttons (directionLtr, directionRtl) with active state reflecting the current paragraph.
  • Vitest coverage.

Open question: keymap. Mod-Shift-L/R is already alignment. Suggest Mod-Alt-Shift-L/R.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions