ckeditor / ckeditor5

Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing.
https://ckeditor.com/ckeditor-5
Other
9.65k stars 3.71k forks source link

Pasting from Excel Online comes with extra text #15268

Closed rturella3 closed 3 hours ago

rturella3 commented 1 year ago

πŸ“ Provide detailed reproduction steps (if any)

  1. Open an Excel file in https://onedrive.live.com/, insert some text and copy the table. image

  2. Paste in a ckeditor (like https://ckeditor.com/docs/ckeditor5/latest/features/pasting/paste-from-office.html#demo) image

The pasted content contains some text and then the table that was copied first.

βœ”οΈ Expected result

The extra text is not present.

❌ Actual result

The pasted content contains some text and then the table that was copied first.

❓ Possible solution

Since the extra text looks like css from a style tag, I was able to fix by including the General HTML Support plugin by allowing styletags:

allow: [
            {
                name: 'style',
            },
],

Also, this behavior may be considered the correct behavior, because CKeditor is originally blocking the insertion of a disalowed tag and converting its content to plain text. If that is the case, then it would be nice to have documented in the documentation and how to prevent with the General HTML Support plugin.

πŸ“ƒ Other details


Witoso commented 1 year ago

Issue confirmed. CKEditor should not populate the editor's content with such data. It should be stripped unless GHS is configured to preserve it.

CKEditorBot commented 1 month ago

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

CKEditorBot commented 3 hours ago

We've closed your issue due to inactivity. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).