Code Formatting

  • Unknown's avatar

    I want to format my embedded code based on the language. I was able to do that in the previous editor by putting the code in [code language='PowerShell'] [/code] tags. How can I do that in the new Gutenberg editor?

    The blog I need help with is: (visible only to logged in users)

  • Hi @mfcetin, this is working on my test site:

    [code language="'PowerShell'"]Write-Host 'Hello, World!'[/code]

    If that isn’t working for you, can you let me know what code you are using? You’ll want to wrap the entire thing in back ticks so it will post here properly.

  • I’m not sure why our forum software is adding extra quotes for you there. But one set of single quotes around PowerShell is what I’ve got.

  • The topic ‘Code Formatting’ is closed to new replies.