facebook / facebook/lexical

Bug: Cannot paste google doc indented paragraph correctly

Open
#4,826 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
23.9k
Forks
2.2k
Avg merge
1d 16h
Merged PRs (30d)
61

Description

Lexical version: 0.11.3

## Steps To Reproduce

1. Type a paragraph and indent the first word via tab (or you can use this [google doc sample ](https://docs.google.com/document/d/1rhCk7Gpc6KqngbE_-cMS74VIZuoL9fFO3ruposgwOGE/edit?usp=sharing))
2. Copy and paste to playground

Link to code example:

## The current behavior
The first paragraph looks different, the indent apply to whole paragraph instead of first sentence.

![Screenshot 2023-07-26 at 11 48 06](https://github.com/facebook/lexical/assets/46393179/0b038c89-3f74-4383-86a3-ac6a58a243ba)

## The expected behavior
The indent should only apply to first sentence.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the paste from the linked Google Doc in the Lexical playground using version 0.11.3, then compare the first paragraph with the screenshot and expected behavior. Trace the paste handling entry point responsible for imported paragraph indentation; done means indentation applies only to the first sentence rather than the whole paragraph.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.