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.59k stars 3.7k forks source link

Newlines are replaced by "`@`" character. #11614

Closed dreirund closed 2 years ago

dreirund commented 2 years ago

Whenever I copypaste text into any message field in the demo at https://ckeditor.com/ckeditor-5/demo/ or on BeWelcome.org (which uses CHKEditor 5), each newline is replaced by an "@" character.

This does not happen when I have JavaScript disabled (on BeWelcome.org only, since on https://ckeditor.com/ckeditor-5/demo/ no imput field appears at all with JavaScript disabled).

I use Firefox version 100.0b3 (64-bit) on GNU/Linux, but it existed for long time for me already.
It does also happen if I start Firefox with extensions disabled.
It does not happen in Chromium.

What could I do/ help to track it down?

Here is an example where I copypasted a text with two paragraphs, the second paragraph has one newline within:


This is the first paragraph of a test text.@@This is the second paragraph of a test text, paragraphs are separated by two consecutive newlines.@This is a new line within the second paragraph.

📝 Provide detailed reproduction steps (if any)

  1. I go to https://ckeditor.com/ckeditor-5/demo
  2. I copypaste a text with newlines that I have pre-written in a local text editor
  3. I observe that each newline is replaced by @.

✔️ Expected result

Newlines are kept.

❌ Actual result

Newlines are removed, and an "@" character is inserted instead for each newline.

📃 Other details


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

niegowski commented 2 years ago

This problem should not happen anymore in v35.3.0.

It was most probably caused by:

https://github.com/ckeditor/ckeditor5/blob/v35.2.1/packages/ckeditor5-typing/src/utils/injecttypingmutationshandling.js#L153-L154

dreirund commented 2 years ago

This problem should not happen anymore in v35.3.0.

But now I cannot paste at all with Firefox (neither via <CTRL>+<V> nor with middle mouse (X.org X11 on GNU/Linux)). (Tested at https://ckeditor.com/ckeditor-5/demo/.) With Chromium, I can paste.