Discussions

Ask a Question
Back to All

What's the markdown for a code block that displays the language type?

What is the markdown required to emulate what you get when using the Code Sample widget? I found your documentation on how to write the markdown for a tabbed code block with a title in each tab, but I don't need two interactive tabs, just the visual look of two tabs so that the language type is displayed in tab A. In other words, exactly what you get when you use the widget.

I tried viewing an existing page in raw mode, but the language specification seems to be bundled in with the code sample.


[block:code]
{
  "codes": [
    {
      "code": "{\n  \"result\": [\n    {\n      \"order_id\": 488,\n      \"status\": \"active\",\n      \"user\": \"\",\n      \"sell\": {\n        \"type\": \"ERC721\",\n        \"data\": {\n          \"id\": \"\",\n          \"token_address\": \"\",\n          \"quantity\": \"1\",\n          \"properties\": {\n            \"name\": \"\",\n            \"image_url\": \"\",\n            \"collection\": {\n              \"name\": \"Gods Unchained\",\n              \"icon_url\": null\n            }\n          }\n        }\n      },\n      \"buy\": {\n        \"type\": \"ETH\",\n        \"data\": {\n          \"decimals\": 18,\n          \"quantity\": \"1200000000000000\"\n        }\n      },\n      \"fees\": [\n        {\n          \"type\": \"royalty\",\n          \"address\": \"\",\n          \"amount\": \"200000000000000\",\n          \"token\": {\n            \"type\": \"ETH/ERC20\",\n            \"data\": {\n              \"decimals\": 18,\n              \"contract_address\": \"\"\n            }\n          }\n        }\n      ],\n      \"amount_sold\": null,\n      \"expiration_timestamp\": \"2120-08-25T04:00:00Z\",\n      \"timestamp\": \"2021-08-25T04:33:19.85441Z\",\n      \"updated_timestamp\": \"2021-08-25T04:33:19.85441Z\"\n    }\n  ],\n  \"cursor\": \"...\",\n  \"remaining\": 0\n}",
      "language": "javascript"
    }
  ]
}
[/block]