editor.js icon indicating copy to clipboard operation
editor.js copied to clipboard

When pasting multiple rows from whatsapp/facebook the break lines disappear

Open yim222 opened this issue 6 months ago • 0 comments

Describe a bug. I am trying to add some simple editor to my website, for adding some text by user. When I'm copying some text from whatsapp/facebook, and it's have some style and multiple rows - after pasting all the text gathers into one row.

I don't know why it happens at other post that I've tested it doesn't occur. Maybe it's because the text post pasted from other source.

(the text are in Hebrew but it doesn't matter, For example this text from facebook: image

looks at the editor:

image

and the inspector: image

Steps to reproduce:

  1. Go to this post at facebook (occurs at other posts too) https://www.facebook.com/groups/socialevents222/posts/1542106200077418
  2. Copy the text
  3. Paste in inside some editor you have created
  4. See how the text becomes one row.

Expected behavior: The text should keep the lines separation and all added style.

Screenshots: See above at the bug description Device, Browser, OS:

PC intel, google-chrome. windows

Editor.js version: "@editorjs/editorjs": "^2.30.2", Plugins you use with their versions:

"@editorjs/header": "^2.8.7",

Header

yim222 avatar Aug 03 '24 22:08 yim222