How to change the language name text in code blocks?
- 03 Aug 2022
- 1 Minuut om te lezen
-
Bijdragers
-
Afdrukken
-
DonkerLicht
-
Pdf
How to change the language name text in code blocks?
- Bijgewerkt op 03 Aug 2022
- 1 Minuut om te lezen
-
Bijdragers
-
Afdrukken
-
DonkerLicht
-
Pdf
There is no Dutch content available for this article, You are viewing the fallback version (English).
You would want to keep a constant name like Example, Sample code, etc., as language name text for code blocks. By default, the respective language name appears in the code blocks. Follow the below workaround to change the language name in code blocks.
This action would change the language name in all the code blocks in your knowledge base.
Solution
- Go to Settings → Knowledge base site → Custom CSS & JavaScript, and Custom CSS tab is the default selection
- Paste the below 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;
}
- Replace the text 'Example' with your desired text
- Click Save
Was dit artikel nuttig?