Tokyo - Components | Code

Last modified:

"Code" component is designed for training contents related to programming languages (HTML, JavaScript, Python....). This component allows adding code from different programming languages without altering the correct running of a unit.
This component automatically recognises the following languages:

  • Apache
  • CSS
  • HTTP
  • JavaScript
  • Objective-C
  • Python
  • Bash
  • CoffeeScript
  • Ini, TOML
  • Makefile
  • PHP
  • Ruby
  • C#
  • Diff
  • JSON
  • Markdown
  • Perl
  • SQL
  • C++
  • Java
  • Nginx
  • Properties
  • Shell Session

You will find this component in the group of "Text" components.

Image 5577

This component does not include any property. We just need to type the corresponding programming language we want to show. It is recommended that you write this code directly or copy and paste it from a .txt file. Do not copy and paste it from other types of files (Word or others), as text formatting from source text will be kept (font, colour, etc.).

We should say there is not any style option shown in the editor menu for the inserted code. Previewing the course is required to see how this component is displayed.
View in edit mode:

Image 5578

View in preview mode:

Image 5579

Is this article helpful for you?
© 2023 Netex Knowledge Factory. All Rights Reserved. Disclaimer | Privacy policy | Cookie Policy.