Language hint in the code block

In the new editor I found how to add the code block (type ```). What I would like to add is language hint. I’m using syntax highlight library that does it for me and it relies on the hint.

The workaround now is to use markup block and use ```js in it. Just wonder if there is a correct way that I’ve missed in the editor or using markup is the only option to add the language hint?

Kind Regards,
Alex

I don’t think so.

Are you referring to this? Sorry, I myself do not understand what you’re trying to achieve.

I don’t think this a feature at the moment. Try requesting it?

In the markdown ``` (three backticks) defines a code block.

```
this is a code block
```

A word typed after the opening triplet goes to class attribute of the generated <pre> tag just like this:

```js
// some javascript here
```

becomes

<pre class="language-js">
// some javascript here
</pre>

In the new Ghost editor you can create a code block by typing three backticks. But I cannot see a way to add language hint. So the question is whether the way exists or it does not?

It’s all right. I’m only interested whether I’ve overlooked it or not.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.