-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
Description
If you paste something like
<a class="mdn" href="https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer"><p>event.dataTransfer</p></a>
within a richtext. The editor gets confused, and the cursor will be stuck in the LinkNode. I'm not sure what the best solution is for such a case.
Lexical version: latest
Steps To Reproduce
- Goto any website. Create the example text. Copy the element.
- Goto https://playground.lexical.dev/
- Paste the html content.
- Start typing. You'll see that you are in a invalid state.
The current behavior
The editor renders the Link, but is stuck afterwards.
The expected behavior
The editor works as expected, like if I paste an anchor with plain text.
Impact of fix
Copy html from any website might lead to an invalid state. User will likely loose data.