To maintain consistency and enable ease of use, designate a standard name such as "Example" or "Sample code" for code blocks. By default, the language name is displayed within these blocks. To modify the language name within code blocks, utilize the following workaround:

Note

This action would change the language name in all the code blocks in your knowledge base.

Solution

  1. Go to the Settings () icon > Knowledge base site > Custom CSS & JavaScript, and Custom CSS.
  2. Paste the below CSS snippet in the window.
div.code-toolbar>.toolbar .toolbar-item:first-child {
    visibility: hidden;
}
div.code-toolbar>.toolbar .toolbar-item:first-child span:before {
    visibility: visible;
    content: "Example" !important;
}
  1. Replace the text 'Example' with your desired text.
  2. Click Save.
    1_Screenshot-change_the_language_name_text_in_code_blocks.png