codex-team / codex-team/editor.js

Copy Pasted content also carries over extra html tags

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

Description

Hello,

I've been using your editor for a while , great job with it by the way. I've encountered this issue recently where copying over content from a google doc also pastes the text formatting for that text. On the previous version of the editor i was using on an old website this wasn't an issue. In the underneath pictures you can see the result of copy pasting the same paragraph from a google doc:

Old version of editorJs
![image](https://github.com/codex-team/editor.js/assets/16243086/14780731-3e93-4092-9a9b-b76ba0f6653c)

New version of editorjs
![image](https://github.com/codex-team/editor.js/assets/16243086/dd549730-88b1-43e8-b129-c473d219e88a)

On the previous website i was using this version of the editorjs and paragraph tool:

"@editorjs/paragraph": "^2.8.0",
"@editorjs/editorjs": "^2.19.0",

On the current one i'm using this version

"@editorjs/editorjs": "^2.27.2",
"@editorjs/paragraph": "^2.10.0",

In both cases I'm initializing the editor in the same way with pretty much the same configuration, I've added a few extra tools tools to the new editor, some ad-hoc, some from the recommended plugins.

I've tried downgrading to "@editorjs/editorjs@2.19.0" and "@editorjs/paragraph@2.8.0", thinking that there might be a difference in how code is sanitized between the different version, the result was the same.

I've also noticed that when i paster this specific paragraph into the editor i get this error
![image](https://github.com/codex-team/editor.js/assets/16243086/a9721d20-9748-439d-a50f-78677e4dce70)

I was wondering if maybe i'm doing something wrong and if there is any way i can remove the unecessary html code on paste.

Thank you!

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.