This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
There seems to be no obvious/official way, with the WYSIWYG editor, to post preformatted code blocks, let alone with any kind of syntax highlighting.
Using the "Examples" form fields on pages is the official way to do this, on page types that have it. For other page types, use the Single_Example template: http://docs.webplatform.org/wiki/Template:Single_Example . Although examples done with that template are not syntax highlighted _yet_, they will be soon once we resolve another bug. Using that template is the best way to make sure that syntax highlighting works as you expect when we enable it.
Alex, this bug pertains to the Q&A forums, not the wiki.
... d'oh. Carry on. :-)
We disabled the WYSIWYG editor completely. There is thought going towards using a markdown editor for the Q&A though. We should be able to make syntax highlighting with code blocks work in there.