Skip to content

Bug: [lexical-playground] clear-formatting doesn't clear text-left/right/center alignment when no formatting to text #7383

Description

@harshmetkel24

Lexical version: all

Steps To Reproduce

  1. Add any text to playground
  2. right align it, without any other formatting like bold, font-size, etc
  3. now try to do clear formatting

Link to code example:
I've verified this fix
Image

The current behavior

pressing cmd+\ do left align text until bold or any other formatting is applied to text.

Screen.Recording.2025-03-26.at.12.18.24.PM.mov

The expected behavior

pressing cmd+\ clears right align and text is left aligned

Screen.Recording.2025-03-26.at.12.20.06.PM.mov

Impact of fix

clear formatting will be improved and cover wider range

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