element-hq / element-hq/element-web

RTE - paste is not working correctly

Open
#30,937 0 comments 0 reactions 0 assignees View on GitHub
A-Rich-Text-Editor O-Frequent S-Minor T-Defect Z-Labs
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

1. turn on the RTE option from the Labs settings to use rich text instead of Markdown in the message composer
2. open an existing room, mention a member -> a pill is displayed
3. copy a text, paste this text in the message composer: the pill disappears and the text is not pasted NOK
4. paste again the text: the text is pasted by adding a line NOK

Note the paste is working well only by selecting "paste and match style"

### Outcome

#### What did you expect?
Do not break existing pills by pasting a text

#### What happened instead?
I lost the existing pills, the text is not pasted.
And, sometimes the cursor is moving to the wrong position in the existing message in the composer.

here is a video for the paste option:

![Image](https://github.com/user-attachments/assets/fd90f97d-9b2c-498b-9538-7e9de79c7ca6)

### Operating system

_No response_

### Browser information

_No response_

### URL for webapp

develop.elemen.io

### Application version

Element version: 625595cb8c4d-js-52bcc2c95505 Crypto version: Rust SDK 0.14.0 (c3b7918), Vodozemac 0.9.0

### Homeserver

_No response_

### Will you send logs?

No

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.