Moodle FEE Docs
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Syntax highlighting

Faculty Moodle has a special plugin Syntax Highlighter for comfortable work with code. This plugin highlights written programming code.

There are two ways to highlight code.

1. HTML mode

Access HTML mode in the text editor via the advanced menu (1.) and pressing the </> button (2.).

Where to find HTML editor
Where to find HTML editor

In the editor wrap your code into

    <pre><code> Your source code </code></pre>

Example

Let’s write some code in Java in HTML mode:

Example of code in Java
Example of code in Java

After saving the code will look like this:

Code after saving
Code after saving

2. WYSIWYG mode

In text editor wrap your kod into triple “back-tic” symbols like this:

    ``` Your source code ```

Example

Let’s write some code in Java in text editor:

Example using WYSIWYG mode
Example using WYSIWYG mode

Result:

Example of the result
Example of the result