Skip to main content
MindTouch Success Center

Syntax Highlighter with <pre> format

The Syntax Highlighter is a MindTouch Editor Style option to display unrendered programming code within a MindTouch page.

Use Syntax Highlighter

  1. From the Editor Toolbar, select <pre> Format under the Style menu.
  2. The Syntax Highlighter container will appear with the default option set to None.
  3. To change the display format, click into the container to display one-click options and a More drop-down with additional options.
  4. After you save the page, the code will appear unrendered.
<p>example code</p>

Syntax Highlighter options

  • CSS
  • HTML
  • JavaScript
  • Java
  • PHP
  • SQL
  • XML
  • AS3
  • ColdFusion
  • CPP
  • C Sharp
  • DekiScript
  • Delphi
  • Diff
  • Erlang
  • Groovy
  • JavaFX
  • PERL
  • PowerShell
  • Python
  • Ruby
  • Scala
  • Shell
  • Text
  • VB (Visual Basic)

Copy unrendered code from published page

In View Mode, hover over a Syntax Highlighter container to display icons, which include a <view source> icon that triggers a pop-up window to copy out the code.

The <view source> icon will appear for most options except None.

Render code within Syntax Highlighter

While the Syntax Highlighter is intended to display unrendered code, you can render code within Syntax Highlighter if you add a class="eval" to the <pre> element via </>HTML view of the page.

  • Was this article helpful?