Notifications

212 views

Description

This KB will explain the various methods on how to enter and format script snippets when creating a knowledge base article.

Procedure

There are several methods which can be used to format the script snippet.

Method #1: Using the "Preformatted" paragraph type in the text editor UI.

  1. Copy your code snippet into your KB article (or write it out completely, whichever suits you best)
  2. Select the entire piece of code
  3. Choose the "Preformatted" paragraph type from the "Paragraph" toolbar item:
  4. You're done (see the blog post: Knowledge Byte #1 - Code Blocks for more screenshots).

Method #2: Modify the HTML source code directly.

  1. Open your KB and enter your script snippet, this is how your script snippet will appear with no formatting:
  2. Click anywhere in your script then click on the 'Source code' (<>) button in TinyMCE, locate your script snippet.
  3. Wrap your script snippet with the <pre> tag and click Ok.

  4. This is how your script snippet will now appear in your KB.

  5. In your KB, click to the right of the last character in the script, then press 'Enter' to create a new line.

You can now start entering your script. When finished, remove the previous script and Save.

For either method used, as specified inĀ KB0680709 "Article Style Guide (KCS)", please set the font to "Andale Mono" or "Courier New" for your script snippets.


Article Information

Last Updated:2020-10-12 10:34:18
Published:2020-10-12
Pasted image (1).png[View]Pasted image (2).png[View]Pasted image (3).png[View]Pasted image.png[View]tinymce_preformatted_paragraph.png[View]