plate icon indicating copy to clipboard operation
plate copied to clipboard

When copy/paste the first line break is not displayed

Open robertio4 opened this issue 1 year ago • 2 comments

Description

When copying text with multiple line breaks from Gmail, notepad, etc., the first line break is lost when pasted into the editor.

Steps

  1. Go to Gmail and write a new message
  2. Write a word and enter two line breaks (by pressing enter)
  3. Copy this text
  4. Paste in any plate editor
  5. The text is displayed without the first line break

https://user-images.githubusercontent.com/13571686/234611528-0e879016-5b4b-49a4-ac16-e540002131f0.mp4

Sandbox

https://codesandbox.io/s/rxo5rl?file=%2FApp.tsx

Expectation

Should be transformed with the same format as Gmail. In google docs it also works fine

Captura de Pantalla 2023-04-26 a las 16 45 40

Environment

  • slate: 0.90.0
  • slate-react: 0.90.0
  • browser: chrome

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar

robertio4 avatar Apr 26 '23 14:04 robertio4