Code block
The code block is especially useful for website owners who want to present technical documentation and want therefore to use syntax highlighting. The element allows users in toujou to display a manually stored code snippet in such a way that it will remind developers at their familiar environment. this leads your technical documentation to more authenticity.
Sample view Manual Pieces of advice
Sample view
const test = "This is a variable";
function add (a,b) {
return a + b;
}
javascript
Manual
Create a code block
- After clicking + Content in the content area of your page, the element selection pop-up window will appear. Select the Widgets tab and then choose Code block.
Pieces of advice
Worth noting: The Code Block element is by default displayed with a black background in toujou. For a different background color, please contact our service team. Please note that the element is just used to illustrate the code snippet in terms of syntax highlighting. There is no automatic check of the entered code in the text field and, also, it has no effect on the page.
Linked tutorials
Tutorials related to this element.