Syntax Highlighting


Add syntax highlighting to a code snippet in knowledge articles.

 

Programmers and Developers can benefit from the following guidelines, to enhance code readability and collaboration within community forums, blogs, and wiki articles.

 

  1. In the Article body section, place the cursor where you want to insert the code snippet.

 

  1. Click the insert/edit code sample icon Insert/Edit code sample icon on the toolbar.

A screen shot of a computerDescription automatically generated

 

  1. In the Insert/Edit code sample dialog box, select a markup or programming language from the Language list.

A screenshot of a computer programDescription automatically generated

 

  1. In the text box after the Language list, enter your code.

Alternatively, you can copy the code from an external source and paste it.

 

 

  1. Click Ok.

Below is an example of the code with syntax highlighting applied.

 

A screenshot of a computer messageDescription automatically generated

 

  1. (Optional) Edit the code by double-clicking the code snippet.