Hello! I’ve been having issues using the code block feature when creating an article in the knowledge base. Is there a specific formatting type that I need to use? I have a standard iframe code.
Hi
Thanks for reaching out about this. For us to better understand the issue you are facing, could you share more about the specifics of the error that you are seeing or what is not functioning as expected with the code provided within code block (formatting issue, failure to upload, etc.)?
Looking forward to hearing back and assisting further!
Best,
Justin
Then when I got to preview the page, it still looks like this.
So I’m wondering if there are special formatting requirements in the knowledge base that I need to input around my code.
Hi
Thanks for the update. Based on what I see here, all of your content is correctly reflected and published in the preview. Based on some of my own experience with the code block and knowledge base, I believe you may be referring to there being an issue with long horizontal lines of code that seemingly cutoff (please let me know if the issue is otherwise).
This is all based on the breakpoints of the page and the code block’s max width. To see the full width of the code snippet a user can scroll horizontally. Alternatively, the code could be reduced in width and vertically spaced. You can compare how this may look in the gif below:
Hopefully this helps clarify the display of the code block. If there are any other questions, please do not hesitate to reach out!
Best,
Justin
For example, if this is my code:
Why is is not showing this when I publish?
In my knowledge base, I added the code block like this:
Then published it and it looks like this:
Reply
Login to the community
No account yet? Create an account
Use your Front credentials
Log in with FrontEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.