When pasting a code block into the editor, the content is inserted but rendered incorrectly as: ```text [object HTMLPreElement] ``` instead of displaying the actual code. ## Steps to Reproduce 1. Open the editor. 2. Copy the following code: ```javascript import EditorJS from '@editorjs/editorjs' const editor = new EditorJS({ tools: { // ... your tools } }) ``` 3. Paste the code into the editor. 4. Observe the rendered result. ## Actual Result The editor displays: ```text [object HTMLPreElement] ``` instead of the pasted code. ## Expected Result The editor should preserve and display the pasted code content: ```javascript import EditorJS from '@editorjs/editorjs' const editor = new EditorJS({ tools: { // ... your tools } }) ``` or create a proper Code block containing the pasted content. ## Environment - Editor.js Version: v2.31.6 - Browser: Chrome - OS: macOS ## Screenshot : <img width="876" height="656" alt="Image" src="https://github.com/user-attachments/assets/6af29ad5-c3d1-42fb-856b-51d54ca830c0" /> ## Issue Video : https://github.com/user-attachments/assets/1c75cac0-ce2c-43b0-a30e-bdc6471a58b2
When pasting a code block into the editor, the content is inserted but rendered incorrectly as:
instead of displaying the actual code.
Steps to Reproduce
Actual Result
The editor displays:
instead of the pasted code.
Expected Result
The editor should preserve and display the pasted code content:
or create a proper Code block containing the pasted content.
Environment
Screenshot :
Issue Video :
Screen.Recording.2026-06-13.at.8.35.44.PM.mov