facebook / lexical

Lexical is an extensible text editor framework that provides excellent reliability, accessibility and performance.
https://lexical.dev
MIT License
19.53k stars 1.65k forks source link

Tab copy and pasted from Word converted to variable number of spaces #5090

Open jspaargaren opened 1 year ago

jspaargaren commented 1 year ago

Lexical version: latest

The current behavior

  1. Sentence cut and pasted from Word - I have highlighted where the tab is: image

  2. Sentence in the Lexical playground - I have put the cursor where the tab should be to illustrate how it's being replaced by spaces:

image

The expected behavior

with the tab maintained in Lexical:

image

funbinhe1996 commented 1 year ago

hi @jspaargaren I verified with two Word, one is keep tab as tab (word web), another one is replaced tab with whitespace. so to get more details, would you like to share your word version information?

jspaargaren commented 1 year ago

Hi @funbinhe1996 - I can confirm that the version of Word that I cut and pasted from is Desktop Word (Microsoft® Word for Microsoft 365 MSO (Version 2307 Build 16.0.16626.20198) 32-bit)

Thank you!