This component is suitable for use when creating accessible courses.
The Code component lets you present formatted code content to your learners.
This article provides an overview of the Code component, component setup and behavior, and examples of Code component configurations.
The Code component lets you present formatted code content to your learners. The Code component can be configured to display code line numbers along the left-hand side.
The Code component is fully responsive and can be added to your Evolve course as a left-handed, full-width, or right-handed component.
Component Set Up
To add this component, follow the steps in this article:
Add a Component
Explore everything there is to know about Evolve. This collection begins with the basics of Evolve and completes with information on the tool's more advanced features. Feel free to start from the beginning or hop around to the specific section that suits your needs.
The Property Panel for the newly added component will then open automatically for you to customize set-up.
Or click anywhere on an existing component to open the Property Panel.
In the General section:
Add Title, or a Display Title, as needed. Display Title is seen by learners.
Scroll down and add your Body. Use the text editor to style and format your text, as needed.
- Add Instruction Text that tells users how to use the component.
- Include an Aria Label for screen readers, as needed.
Interaction Label section
In the Interaction Label section, you can enable an Interaction Label.
The Interaction Label allows you to add a widget before or after the Code component. This widget can display an icon and label prior to the Code component completion, which changes to a different icon and label once the Code component is completed.
In the Code section, you enter code content to be presented to learners.
Below are examples that illustrate the Code component setup:
Example 1 – displays the Code component with example of html-code content.
Example 2 - displays the Code component with example of html-code content and the setting Show Line Number enabled.
- Select Code Style from the available themes docco, monokai, github, or tomorrowNight.
- Toggle to Show Line Numbers. With this setting enabled, code line numbers will be shown along the left-hand side in the Code component.
- Set Starting Line Number as needed.
Note: Set Starting Line Number requires Show line Numbers to be enabled.
Did this article help?
Let us know by leaving a star rating or review at the top of this article.