I want to display Response and Request pattern of API in API Reference Guide. In the pattern, I want to show JSON in the "code" tag and properly styled
I have tried and used 'pre' tags and enclosed around it. styled with 'white-space' attributes. The problem is that "It is displaying as it is(literally means the long spaces used for indentation that exists in html code editor. it is problematic when we this 'code' tag in very nested html elements) in html "code" while using pre-wrap
{"username":"user","password":"12345"}
Above mentioned code should show following way.
{
"username":"user",
"password":"12345"
}
And additional details of my problem can get from following pen https://codepen.io/chaikishu/pen/XogomL