When looking for a syntax highlighting solution for WordPress I asked a few people. I also did the Google thing and searched. I came across a plugin that looked promising called SyntaxHighlighter Evolved by Alex. It uses the SyntaxHighlighter JavaScript package by Alex Gorbatchev . It’s what WordPress uses in their hosted solution.
Anyways, it supports brushes which allow you to extend the highlighting to additional languages. Someone had already made a Brush for RouterOS for the JavaScript package, but in order to use it it with the WordPress plugin it had to be packed into it’s own plugin which I’ve done. I improved the brush by adding more keywords from the Notepad++ syntax highlighter from the Mikrotik forums and Andrew’s blog.
I still need to test all the keywords, and add custom highlights that match WinBox coloring.
Here it is:
syntaxhighlighter-routeros 1.0.0
- Install SyntaxHighlighter Evolved.
- Install this plugin.
- Use [ros] and [/ros] around your code.