How to add code example in code block section?

When adding a code example within a code block, upon saving the documentation, the inserted code example and other content become merged, resulting in a disorganized presentation.

Hi @pratimamariserla. Welcome to the Postman Community!

Can you share a screenshot(s) of what you’re trying to describe?



Hi @gbadebo-bello ,
Thank you for your prompt response :slight_smile: .
I have included both screenshots:

  1. The first screenshot depicts the example code within a code block.
  2. The second screenshot illustrates the content after saving.

Hi @pratimamariserla. You’re adding the code sample, but have selected “Plain Text” as the format which is why the code doesn’t get any formatting. At the to left menu in the code input box, toggle it and select “JavaScript”. This will enable formatting and syntax highlighting for your javascript code.

Hello @gbadebo-bello, I have attempted to select another language for formatting, but it yields the same result. Attached is a screenshot for reference.

I attempted to manually add a code example, but the result appears as follows.

Hi @pratimamariserla. If you select “JavaScript” as the formatting language, then you have to only provide Javascript code to the text editor. Here you’re providing HTML code instead.

Hi @gbadebo-bello,Currently, I’m exclusively inputting JavaScript code into the text editor and selecting the JavaScript option. However, it consistently produces the same error.

Hi @pratimamariserla.

Can you share a screenshot of what you currently have?