Powershell Code Blocks
closed
Jiri Novacek
Had same issue, added PowerShell to Visual Editor code block dropdown manually - by editing file /assets/js/editor-ckeditor.js and adding {language:"powershell",label:"PowerShell"} . After wiki service restart and browser refresh new item is present and syntax highlighting works as well as it would using markdown editor. I have added couple more definitions (JSON, DOS...) from the list @ https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md . Don't know if there is any better way how to achieve this.
Nicolas Giard
closed
This is already possible... Read the docs for code block syntax highlighting. By using the term "powershell" or "ps", the proper coloring will be applied to your code.
T
Thomas Liebald
Nicolas Giard: So if all is documented...why not sharing a link to it?
I searched a lot...but noting found.
And: I'm talking about the CKEditor...I'm aware that his syntax highlighting supports Powershell, but in wikijs the editors language menu powershell is missing...
So beeing a bit more specific: I want syntax highlightinh for powershell in the "Visual Editor"