---
sourceDocument: Australia ServiceNow AI Platform Capabilities
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/de-DE/servicenow-platform

 Release :

    - australia

ft:locale :

    - de-DE

ft:publication_title :

    - Australia ServiceNow AI Platform Capabilities

ft:clusterId :

    - platcap

bundleId :

    - platcap

workflow :

    - Platform


---

# Format a code snippet automatically in knowledge articles

# Format a code snippet automatically in knowledge articles {#ariaid-title1}

* Freigeben Version: Australia
* 
* Aktualisiert 12. März 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 Minute Lesedauer

Add syntax highlighting to a code snippet in knowledge articles using the HTML
editor.

## Vorbereitungen

Open the knowledge article in which you want to use the HTML editor.

Role required: knowledge

## Warum und wann dieser Vorgang ausgeführt wird

You can also use the HTML editor when creating or editing a knowledge article using the Knowledge Management application in the ServiceNow AI Platform interface or in Agent Workspace. To create or edit a knowledge article in the ServiceNow AI Platform interface, see [Create a knowledge article](https://servicenow-prod.fluidtopics.net/qtjyuYCGYgTlyiJwJy_zyQ "Knowledge contributors can create and edit knowledge articles within a knowledge base to share information across your organization.") or [Edit a knowledge article](https://servicenow-prod.fluidtopics.net/rCTXLQFojrVaYGC58PJJhQ "Edit knowledge articles within a knowledge base to update information shared across your organization."). To create or edit a knowledge article in Agent Workspace, see Create a knowledge article in Agent Workspace or Edit a knowledge article in Agent Workspace.

## Prozedur

1. In the Article body section, place the cursor where you want to insert the code snippet.
2. Click the insert/edit code sample icon (![Insert/Edit code sample icon]()) on the HTML toolbar.
3. In the Insert/Edit code sample dialog box, select a markup or programming language from the Language list.
4. In the text box after the Language list, enter your code.  
   Alternatively, you can copy the code from an external source and paste it.
5. Click Ok.
6. **Wahlweise:** Edit the code by clicking the code snippet, and then clicking the insert/edit code sample icon (![Insert/Edit code sample icon]()).

