H5P allows you to write code snippets in rich textual editors. This feature is disabled by default and you can turn it on on your profile page. Follow the steps below to do so:
- Click on your profile
- Select "My Account"
- Check the "Inline code" and "Code snippets" checkboxes to allow code options inside rich text editors
Below is an example of code snippets in H5P