Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pasting text into a list can erase the list #8683

Closed
neongreen opened this issue Dec 15, 2020 · 7 comments
Closed

Pasting text into a list can erase the list #8683

neongreen opened this issue Dec 15, 2020 · 7 comments
Labels
package:list resolution:expired This issue was closed due to lack of feedback. squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@neongreen
Copy link

📝 Provide detailed reproduction steps (if any)

  1. Go to https://ckeditor.com/ckeditor-5/demo/
  2. Type "a", press Enter, press Cmd+A Cmd+C (might also work with Ctrl+A Ctrl+C on non-Macs)
  3. Erase everything
  4. Create an empty bullet list
  5. Paste (Cmd+V)

✔️ Expected result

The list remains

❌ Actual result

The list is replaced by pasted text

📃 Other details

This sometimes happens even when the copied text is a single paragraph and not two paragraphs — e.g. if I type a single line of text in Telegram for macOS, copy it, and paste into CKEditor.

  • Browser: Chrome
  • OS: macOS Catalina

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@neongreen neongreen added the type:bug This issue reports a buggy (incorrect) behavior. label Dec 15, 2020
@LukaszGudel
Copy link
Contributor

Hi @neongreen, thank you for the report. I can confirm this issue. Current list implementation in CKEditor5 is not allowing block elements inside list items. You can read more about this here

This sometimes happens even when the copied text is a single paragraph and not two paragraphs — e.g. if I type a single line of text in Telegram for macOS, copy it, and paste into CKEditor.

This behaviour is related to the selection of copied text. If you copy only text inside single block then it is added as another list item, but if you select some container of this text as well then it will be pasted as block element, which is currently not possible and breaks the lists. Similar behaviour can be also reproduce inside the editor:

@neongreen
Copy link
Author

Current list implementation in CKEditor5 is not allowing block elements inside list items.

Sure, I know this.

However, CKEditor could still be smarter about detecting whether the pasted text is a single paragraph.

@Mgsy Mgsy added package:list squad:core Issue to be handled by the Core team. labels Dec 17, 2020
@oleq
Copy link
Member

oleq commented Feb 19, 2021

I wonder if this is somehow related to #8684.

@mlewand mlewand added this to the backlog milestone Mar 1, 2021
@pomek pomek removed this from the backlog milestone Feb 21, 2022
@CKEditorBot
Copy link
Collaborator

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.

@neongreen
Copy link
Author

Still happens with document lists in v40.

@CKEditorBot
Copy link
Collaborator

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
Copy link
Collaborator

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).

@CKEditorBot CKEditorBot added resolution:expired This issue was closed due to lack of feedback. and removed status:stale labels Dec 11, 2024
@CKEditorBot CKEditorBot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:list resolution:expired This issue was closed due to lack of feedback. squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

7 participants