Support Center

Using Code Syntax Highlighter

From Administration > Advanced

 

Enable Syntax Highlighter : (Default :NO)

If enabled, Allows you to highlight language code with your selected brushes in the article. See more for syntax highlighter tokens

Categories

Brushes : (Default: None)

Allows you to select the language brushes use in the article. Available only when enabled syntax highlighter.

Themes : (Default : Default)

Allows you to select the syntax highlighter theme to apply. Available only when enabled syntax highlighter.

Using Syntax Highlighter is fairly easy. When writing a new article, simply wrap your code sample in the {Code:language} token like following:

{code:language} 

Sample Code

{/code}

Be sure to replace language with your sample code language. Refer to example below for sample C# code

For Example:

{code:c#} 
private string GetHellWorld()
{
    return "Hello World";
}
{/code}

Note: Please change the { } (Curly Brackets) to [ ] (Square Brackets)

Following options are available for language; make sure you have the appropriate brush enabled in settings.

  • applescript
  • actionscript3
  • as3
  • bash
  • shell
  • coldfusion
  • cf
  • cpp
  • c
  • c#
  • c-sharp
  • csharp
  • css
  • delphi
  • pascal
  • diff
  • patch
  • pas
  • erl
  • erlang
  • groovy
  • java
  • jfx
  • javafx
  • js
  • jscript
  • javascript
  • perl
  • pl
  • php
  • text
  • plain
  • py
  • python
  • ruby
  • rails
  • ror
  • rb
  • sass
  • scss
  • scala
  • sql
  • vb
  • vbnet              
  • xml
  • xhtml
  • xslt
  • html

Glad we could be helpful. Thanks for the feedback.

Sorry we couldn't be helpful. Your feedback will help us improve this article.

How helpful was this page?

  
Updated on Mon, 03 Sep 2018 by Khushi Singh