Get Started

Theme switcher

Code Blocks

The Theneo web editor's Code Block widget allows you to easily insert code snippets into your documentation. Syntax highlighting is supported for a wide range of programming languages, making your code snippets clear and easy to understand.

To insert a code snippet:

  1. Navigate to a new line in the Theneo web editor where you want the code block to appear.
  2. Type /code to trigger the widget selection menu.
  3. Choose 'Code Block' from the list of widgets.
  4. Select the programming language from the drop-down menu to apply syntax highlighting.
  5. Paste or type your code into the code block.

Here's an example of a formatted code snippet in JavaScript:

JavaScript
// Theneo API Magic Elixir Mixer
function createElixir(elixirName, ingredients) { console.log(Creating ${elixirName} Elixir with the following ingredients:); ingredients.forEach((ingredient, index) => { console.log(${index + 1}. ${ingredient}); }); console.log(${elixirName} Elixir is ready to empower your API!); }
// Mix a 'Restful Rejuvenation' elixir for your API createElixir('Restful Rejuvenation', ['REST', 'JSON', 'OAuth 2.0', 'CORS']);
Was this section helpful?

What made this section unhelpful for you?

On this page
  • Code Blocks