How to add code snippets

Code snippets may be entered anywhere you see a text editor box

Select the Insert Code Snippet icon

Image of text editor with cursor hovered over 'Insert Code Snippet' icon

Select the language of your code

Displaying available code languages

 If you’d like additional languages, email learninginnovation@duke.edu. Visit https://highlightjs.org/ to see if your desired language is supported.

In 'Code Content' box enter your code and select 'Ok' button

Example of CSS code entered

Your code will be displayed with syntax highlighting

Example of text editor with CSS code highlighted