Syntax higlighting?

How to post syntax-higlighted code? I didn’t find an answer in FAQ. I didn’t find an answer on the commonmark site either, but I’ve seen on this forum that in some posts the code is higlighted. How to do it?

I personally haven’t seen one. Can you give an example? The best I have seen is the code block.

There is a </> icon on top bar.

code here

@pfeiffer_andrei

There is a </> icon on top bar.

Sure, there is, but a code inserted this way is not highlighted. It’s just wrapped in <pre><code></pre></code> tags.

@softomatix

I personally haven’t seen one. Can you give an example?

Here you go: Change the JSFiddle starter link on Gitter

Refer to this: https://guides.github.com/features/mastering-markdown/#syntax

Examples:

<div id="test"></div>
var test = new Element({
  prop1: 'test-value'
})
3 Likes

Thank you.

So it would be great to add it to FAQ. It would be even better i it was possible to choose a syntax higlighter language directly from the post toolbar. IMO JavaScript should be set by default.