You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When exporting content containing code blocks to HTML and then reinitializing the Lexical editor with that HTML, the code block content becomes misformatted or corrupted. This issue occurs consistently when using the right-click paste method to insert code.
Lexical version:^0.16.10
Steps to Reproduce
Insert a code block into the Lexical editor.
Copy and paste a code snippet into the editor by right-clicking and selecting "Paste".
Export the content to HTML.
Reload the page and initialize the Lexical editor with the previously exported HTML.
Observe that the code block content is now misformatted or corrupted.
Expected Behavior
The code block content should remain intact and properly formatted after exporting to HTML and reinitializing the Lexical editor with that HTML.
Current Behavior
The code block content becomes misformatted or corrupted after exporting to HTML and reinitializing the Lexical editor.
Describe the Bug
When exporting content containing code blocks to HTML and then reinitializing the Lexical editor with that HTML, the code block content becomes misformatted or corrupted. This issue occurs consistently when using the right-click paste method to insert code.
Lexical version:
^0.16.10
Steps to Reproduce
Expected Behavior
The code block content should remain intact and properly formatted after exporting to HTML and reinitializing the Lexical editor with that HTML.
Current Behavior
The code block content becomes misformatted or corrupted after exporting to HTML and reinitializing the Lexical editor.
Code Example
stackblitz Example
Impact of Fix
Additional Context
Add any other context, screenshots, or logs about the bug here. For example:
The text was updated successfully, but these errors were encountered: