I’m trying to use syntax like this:
var foo = "bar"
But in the new Ghost 2.0 editor it switches modes to a code block as soon as I type the third back tick. Is there a way to disable this, or provide the language through some other means?
In the meantime I can fall back to HTML, but would be nice to see if there’s a better workaround.
October 2, 2018, 3:13pm
@subdigital correct, the language selection feature isn’t built into the code card at present. Rather than using a HTML card you could use the markdown card which does support the syntax you want to use
October 16, 2018, 3:13pm
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
May 7, 2019, 11:47am
As of Ghost 2.22.0 it’s now possible to set the language when using fenced code blocks…
Enter will set the language immediately when creating the code card or you can use the language input inside the code card once it’s created.