Revindex Wiki

Code blocks

Last updated on 2016-03-18 1 mins. to read

If you wish to display special syntax such as Javascript, CSS or any text that shouldn't be formatted like the usual text, you can embed code blocks and the Wiki will render it in a nice unformatted view layout. Simply click on the editor's Source view and enter your content wrapped with the <pre><code class="language-xxx">...</code></pre> tags. Make sure to specify the class language you like. You may omit the <pre> if you don't need to preserve spacing.

<pre><code class="language-html"> 
some code here

Currently, the available supported languages for code blocks are shown below. Most of these languages are flexible. Therefore, you can use the "clike" language to display formatted content for languages like C#, C++ that are based on the C syntax or use "htmlmixed" to display HTML or ASP.NET syntax.

  • language-
  • language-css
  • language-clike
  • language-htmlmixed
  • language-javascript
  • language-sql
  • language-xml


Powered by Revindex Wiki