Hi, I’m building a blog and I found an issue when writing
tags like this:
Empty tags shows up before the real text:
Is there a way to solve this? or use native code blocks? because I can’t found them… the code blocks render like
Ps: if I write the HTML like this, an unexpected indent appears before the real text
Also, trying more things, this happened: when I write HTML like this in the HTML editor
only the first two lines are rendering…
I’m using react markdown and react syntax highlighter
Can you clarify where this code lives/where are you using an html editor? I’m not seeing this in your Builder space. Is this content you are authoring in Builder? Any content links or code you can share would be great!
Hey, i think it’s a bug from ReactMarkdown… this code lives here.
Is there a way to write code blocks without writing HTML tags in the editor? thanks
To confirm, are you referring to writing code blocks like the code blocks within the content field on the entry you shared above? If you’re wanting to display code in a text block, you can either edit the text as code and add tags to create code blocks or you can highlight the text and select the code icon to convert the text to code. Both options will wrap the text in an html code tag. Another route you could take would be to create a custom component specifically for code blocks similar to the example here.