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 I reload the page the id of the paragraph is retained but the code changes
I have attached the logs of the editor content when I pass the content to the editor after reload
(First log is before reload , rest after reload)
@philippkuehn Okay, but when I log editor.getHTML() , I see that the id has been assigned to the code tag. Why is it not assigned to the pre tag? Is there a way to change it?
What’s the bug you are facing?
Hey, Im facing a bug with the unique id extension.
I have use case where I save the editor content as HTML on the database and when I read it I pass something like this as content to my editor
<pre><code data-id="7fdaf950-a69a-40cc-9c26-80c6694574df">test code</code></pre><p data-id="8521a8c5-507c-4464-baf4-3f9147ef7b96">Test paragraph</p>
When I reload the page the id of the paragraph is retained but the code changes
I have attached the logs of the editor content when I pass the content to the editor after reload
(First log is before reload , rest after reload)
This is my uniqueId config
This issue doesn't happen when I pass JSON instead of HTML
How can we reproduce the bug on our side?
<pre><code data-id={uuid}>test code</code></pre>
Can you provide a CodeSandbox?
No response
What did you expect to happen?
I expect the id of the codeBlock to be retained.
Anything to add? (optional)
No response
Did you update your dependencies?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: