Does anyone know how to add code markup for questions & answers in this forum?

In Stack Overflow, one can do something like this:

<!-- language: c# -->

var some = "code in here";

and it will do some syntax highlighting (for example, see here)

On this website however we don't seem to have syntax highlight options. Anyone has a clue if this can be added?

  • I was missing it too Feb 20, 2013 at 21:10
  • What programming languages are used together with Tridion?
    – Adam Lear StaffMod
    Feb 22, 2013 at 21:06
  • Mostly c# & Java, sometimes XSLT, and - like with any Web-oriented system - Javascript
    – Nuno Linhares Mod
    Feb 22, 2013 at 22:18

2 Answers 2


Per this Meta Stack Overflow question and its first answer: Changes to syntax highlighting it sounds like two things have to happen:

  1. We need one of the SE Community Managers to turn on automatic syntax highlighting for the site
  2. As we add tags such as c#, javascript, xml etc. which should have language specific highlighting, we need a diamond level moderator to set the syntax hightlighting format for the specific tag.

Given this I am going to flag this post as needing moderator attention


This is enabled now. Since questions are often asked and answered without a language tag attached to them, I've enabled the default highlighting (using automatic language detection) on all posts - the special <!-- language:... comments can be used to override this where necessary (this is primarily useful for languages that aren't auto-detected, and to turn off highlighting altogether).

Because languages are often mixed (XML+C#, etc), moderators should not override this auto-detection for specific tags unless absolutely necessary (Visual Basic derivatives might be one case where overriding the default is desirable, since they're not auto-detected).

  • 1
    Thanks for turning this on for us @Shog9 Feb 23, 2013 at 0:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .