You may want to add code examples, or snippets, to your knowledgebase article to show your users how to achieve a particular effect or address a common problem. KBPublisher makes this easy by providing formatting tags to put around the example. When your readers look at the article, the example code appears, correctly formatted for the coding language you specify, and highlighted as it would appear in a code editor for that language, in a box to set it off from the rest of the text.
There are two options to add code snippet to an article.
Option 1 - toolbar button
To add code snippets to an article by using the toolbar button:
Open the article for editing.
Place cursor where you want the code snippet to appear. (You can move the snippet later, if needed.)
Click the "Insert Code Snippet" icon in the editor toolbar .
In the Code snippet window, select a language and add your code content.