Skip to content

Bug: Text alignment is lost on copy-paste #8101

@aldoprogrammer

Description

@aldoprogrammer

Lexical version: latest (tested on https://playground.lexical.dev)

Steps To Reproduce

  1. Create multiple paragraphs.
  2. Set the first paragraph alignment to center or right.
  3. Copy the first paragraph.
  4. Move the cursor to another paragraph that has default left alignment.
  5. Paste the copied content.

Demo

Link to code example

https://playground.lexical.dev/

The current behavior

The pasted text is reset to left-aligned, even though the copied text was center- or right-aligned.

The expected behavior

The pasted text should preserve its original alignment (center or right).

Impact of fix

This affects basic formatting workflows. Users expect copy-paste to retain alignment, especially in document-style editors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    copy+pasteRelates to Lexical Copy/Paste

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions