Improve Copy/Paste Functionality in rich text editor

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Current Behavior

When attempting to paste content into an existing list item in rich text editor (RTE) mode:

  1. The paste operation creates an unwanted new list item
  2. The copied content is inserted into this new list item
  3. This occurs even when the cursor is explicitly positioned within an existing list item

When in RTE mode and building a list, if I want to copy something into a list item, I’ll click where I want to paste the copied thing, then paste it. When I paste it will create a new list item instead of just pasting the content I’ve copied. This is annoying. I now either need to delete/backspace on the newly created bullet item or switch to PTE. Here’s a GIF example.

CleanShot 2024-12-31 at 10.56.56.gif

Expected Behavior

The copied content should be inserted at the cursor position within the existing list item, without creating a new list item.

Steps to Reproduce

  1. Enter RTE mode
  2. Create a list (either bullet or numbered)
  3. Copy some content from anywhere
  4. Click to position cursor within an existing list item
  5. Paste the copied content (Ctrl+V/Cmd+V)

Current Workarounds

Users currently need to either:

  • Delete/backspace the unwanted new list item after pasting
  • Switch to PTE mode to paste content within list items

Impact

This behavior disrupts the editing workflow and forces users to either perform extra delete actions or switch between RTE and PTE modes, reducing productivity and creating a frustrating user experience.

This bug was identified and sent by @jmandell 🙇 thanks, Justin! Keep the feedback coming 🤝

Edited by 🤖 GitLab Bot 🤖