Fanray provides Shortcodes to help with complex content input, such as Source code and YouTube videos.

Source Code

The Source Code shortcode uses SyntaxHighlighter to highlgith source code, here are the supported languages. For example, to post C# code

[code lang=cs]
paste your code here…

The following attributes are supported

  • highlight: (comma-seperated list of numbers) - You can list the line numbers you want to be highlighted.
    [code lang=cs highlight=1,3]
    your source code line 1 and 3 will be highlighted
  • gutter: (true/false) - If false, the line numbers on the left side will be hidden. Defaults to true.
    [code lang=cs gutter=false]
    you won’t see line numbers on the left
  • firstline: (number) - Use this to change what number the line numbering starts at. It defaults to 1.
    [code lang=cs firstline=87]
    the line number on the left starts at 87
  • htmlscript: (true/false) - If true, any HTML/XML in your code will be highlighted. This is useful when you are mixing code into HTML, such as razor content. Defaults to false. Only works with certain languages. Don’t use this attribute when lang is already html or xml.
    [code lang=cs htmlscript=true]
    paste your cshtml code here


To post a youtube video, get the video’s url, any of the two formats will do.




To embed the video with default width and height (560 x 315)


To specify the width and height explicitly


To specify the width only


To start at a certain point in the video, convert the time of that point from minutes and seconds to all seconds, then add that number as shown (using an example start point of 1 minute 15 seconds)