Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: codeblock-lowlight doesn't render in html output #394

Closed
MODSetter opened this issue May 18, 2024 · 1 comment
Closed

bug: codeblock-lowlight doesn't render in html output #394

MODSetter opened this issue May 18, 2024 · 1 comment

Comments

@MODSetter
Copy link
Contributor

Provide environment information

System:
OS: Windows 11 10.0.22631
CPU: (16) x64 AMD Ryzen 7 5800X 8-Core Processor
Memory: 4.96 GB / 15.92 GB
Binaries:
Node: 22.1.0 - C:\Program Files\nodejs\node.EXE
npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 9.0.6 - C:\Program Files\nodejs\pnpm.CMD

Describe the bug

With recent codeblock-lowlight extension integration: #375 it works perfectly in the editor but when I render the editor contents as HTML from (window.localStorage.getItem("html-content")), it changes the code content to plain html text.

Editor:
148836219-bbad8c30-318f-4d37-b748-c96b7b033bc4

When HTML rendered from from (window.localStorage.getItem("html-content")):
148836232-daf4c2ed-309c-4d34-a75c-c1658b0575c2

Link to reproduction

None

To reproduce

Just render the content from (window.localStorage.getItem("html-content")) using dangerouslySetInnerHTML like:

<div className="tiptap ProseMirror prose prose-lg dark:prose-invert prose-headings:font-title font-default focus:outline-none max-w-full"
dangerouslySetInnerHTML={{
__html: window.localStorage.getItem("html-content"),
}}
></div>

Additional information

I am working on its fix will raise PR soon.

@MODSetter
Copy link
Contributor Author

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant