Source Code

This shortcode will syntax highlight the source code with the language you set in the lang attribute.

[scode]{content}[/scode]
[scode lang="{language}" gutter="{gutter}" line="{line}" highlight="{lines}"]{content}[/scode]
  • {language}: programing language to highlight the source code in {content}.
  • {gutter}: show (true) or hide (false) gutter with the line number.
  • {line}: start line number for the highlighted block, if not used, default is 1.
  • {lines}: comma separate list of lines to highlight.

The list of supported languages is listed here:

  • applescript: AppleScript
  • actionscript3, as3: ActionScript3
  • bash, shell, sh: Bash
  • coldfusion, cf: ColdFusion
  • cpp, c, cc, c++, h, hpp, h++: Cpp
  • c#, c-sharp, csharp: CSharp
  • css: CSS
  • delphi, pascal, pas: Delphi or Pascal
  • diff, patch: Diff
  • erl, erlang: Erlang
  • groovy: Groovy
  • haxe, hx: Haxe
  • java: Java
  • jfx, javafx: JavaFX
  • js, jscript, javascript, json: JavaScript
  • perl, pl: Perl
  • php: PHP
  • text, plain: Plain Text
  • powershell, ps, posh: PowerShell
  • py, python: Python
  • ruby, rails, ror, rb: Ruby
  • sass, scss: SASS or SCSS
  • scala: Scala
  • sql: SQL
  • swift: Apple Swift
  • tap: Tap
  • typescript, ts: Typescript
  • vb, vbnet: VisalBasic
  • xml, xhtml, xslt, html, plist: XML, HTML

Finally, plugin can show the highlighted content using different color styles, and you can change that via the Feature BBCodes panel.

1
0
27
Rate this article

You are not allowed to rate this post.

Leave a Comment