codex-team / codex-team/editor.js

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

Open
#2,803 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
31.9k
Forks
2.2k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

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](https://github.com/user-attachments/assets/4997f4b9-2e90-4803-b08f-877961c69fee)

looks at the editor:

![image](https://github.com/user-attachments/assets/e8be70f9-2f17-43c5-b145-02f96adfd020)

and the inspector:
![image](https://github.com/user-attachments/assets/62a44b6b-c4d6-4cbf-9151-6f8ecd957da2)

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.