Code can appear on your OLI page either inline, with regularly formatted text, or alone on the page as a Code Block.
Inline code format
In order to create inline code, highlight your text and select the CODE option from the Text Block options ribbon.
Code block
Code blocks stand alone on the page to demonstrate the syntax and format of computer code you're teaching, without the code being executed by the browser.
To insert a code block, highlight the page element it should follow and select INSERT CODE BLOCK from the Insert area of the ribbon. In this example, a text block is selected (note the yellow accent on its left edge) and the new code block will be inserted after it.
Code blocks can optionally include line numbers and highlighting.
To highlight lines, enter their line numbers in the HIGHLIGHT field in the details column on the right side of the screen when the code block is selected. Enter multiple line numbers as a comma-separated list with no spaces.
Echo supports codeblock formatting for these languages:
- ActionScript
- Bash
- C
- C++
- HTML
- Java
- Python
- Text
- XML
ActionScript code block example:
Bash code block example:
C code block example:
C++ code block example:
HTML code block example:
Java code block example:
Python code block example:
Text code block example:
XML code block example: