Mivhak Syntax Highlighter

Description

Have you been looking for a syntax highlighter that is safe to use on both the visual and the HTML WordPress editor? What
about a tool that highlights your syntax While writing your code, and also checks for syntax errors?

Well, look no further. Mivhak is a lightweight syntax highlighter for WordPress, based on a slightly modified version of the great Ace Code Editor.
Mivhak comes with a simple settings panel that allows the user to setup basic plugin behavior and appearance.

Additionally, code can be easily inserted to both the HTML and the visual editor using a TinyMCE popup the features live syntax highlighting and error checking for 100+ languages.

Features

  • Lightweight – minified CSS and JS, language scripts and themes are loaded on request
  • Supports 130+ different programming languages
  • 36 different skins
  • Visual + HTML editor code insertion buttons
  • Backend code editor with live syntax highlighting and error checking
  • Options to add caption text, change starting line, highlight single/multiple lines, and much more!
  • Easy-to-use control panel
  • Visual editor placeholders with floating control bar (see screenshots)
  • Automatic code highlighting for <pre>, <code> and/or <xhr>
  • Works with Markdown
  • Inline and block code widgets

Useful Links

Available Translations

  • English
  • Hebrew
  • German
  • Danish

Screenshots

  • Code snippet before Mivhak
  • Code snippet after Mivhak
  • General settings section under Mivhak options page
  • Skin selector under Mivhak options page
  • Code can be easily edited or removed in the visual editor
  • The code insertion/edition popup window

Installation

  1. Download and activate the plugin.
  2. Use the control panel to choose a skin.
  3. Specify which tags you would like Mivhak to prettify (CODE, PRE, XHR).

Reviews

Good Highlighter

Overall, an excellent syntax highlighter. I’m a PowerShell scripter, and Mivhak does a decent job of recognizing PowerShell syntax. Not perfect, but probably 90%. A few obvious annoyances — it only recognizes mixed case cmdlets — so, Get-Command is recognized, but get-command is not. That’s one that needs fixing. It also seems to break down a bit with multi-line commands and some of the newer syntax.

On the huge plus side, however, by setting the default language to PowerShell, it immediately recognized the existing code on my site that had been coded PRE and had used a previous pair of plugins that had to be abandoned because of security issues. This was a massive time saver.

I’d like to see the ability to easily update the syntax engine, or contribute to that, and I’d like to see the ability to tweak existing themes and/or create new ones.

Read all 20 reviews

Contributors & Developers

“Mivhak Syntax Highlighter” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.3.9

  • (FIX) Fixed an issue related to the Amarkal framework.

1.3.8

  • (FIX) Fixed an issue that was causing PHP 7.1 to throw a lexical error.

1.3.7

  • (FIX) “mivhak_settings is not defined” error fixed.

1.3.6

  • (FIX) Moved render blocking scripts to footer
  • (NEW) Added 5 new languages

1.3.5

  • (NEW) Added a Danish translation (Thanks Henrik Gregersen!)
  • (FIX) Made TinyMCE button public facing as well

1.3.4

  • (NEW) Added 2 new translations: Hebrew & German
  • (NEW) Added a .pot file for internationalization
  • (UPDATE) Changed internal file structure
  • (UPDATE) Updated Ace Editor to the latest version (1.2.3)

1.3.3

  • (NEW) Added support for Jetpack Markdown code parsing
  • (FIX) Visual Editor nextSibling issue

1.3.2

  • (NEW) The code font size can now be set in Mivhak->Appearance
  • (NEW) Users can now highlight single and multiple lines
  • (FIX) Safari hidden code issue

1.3.1

  • (NEW) Users can now set the initial visibility of a code block. If hidden, a “show code” button will be visible to control the visibility of the code block
  • (FIX) Only showing caption when necessary
  • (FIX) Editor popup editor updates to reflect changes when “starting line” is changed

1.3.0

  • (UPDATE) Bumped up ace version to 1.2.2
  • (NEW) Option to add caption text
  • (NEW) Option to set the starting line
  • (NEW) Added new languages: Dockerfile, HTML Elixir, Maze, Praat, SQLServer, Swift, Swig.
  • (FIX) Formatting issues when switching between editors
  • (FIX) Issue that was breaking embedded media
  • (FIX) WordPress Editor floating bar issue
  • (FIX) <p> tag encoding issue

1.2.6

  • (FIX) Move the cursor out of the inserted element after inserting
  • (FIX) Issue that was breaking the editing functionality in the visual editor
  • Tested under WordPress 4.2.3

1.2.5

  • (UPDATE) Bumped up ace version to 1.1.9
  • (NEW) Added 12 new languages: ABC, AppleScript, Eiffel, Elixir, Elm, G-Code, gitignore, io, Lean, Mask, MIPS Assembler and Vala.
  • (FIX) Removed 2 unsupported languages: HTML Completions, MUSHCode High Rules.
  • (FIX) Inline code element issue.

1.2.4

  • (UPDATE) Amarkal Framework v0.3.6
  • (NEW) Added <pre> quicktag to the HTML editor
  • (FIX) Improved the way HTML formatting is preserved when switching between editors
  • Tested under WordPress 4.2.1

1.2.3

  • (FIX) Fixed some notices that were showing when WP_DEBUG was set to true
  • (FIX) Uninstalling the plugin now removes any traces from the database
  • (NEW) Add an option the write custom CSS (under Mivhak->appearance)

1.2.2

  • (FIX) PHP Strict Standards issue

1.2.1

  • (NEW) Selected text is used as input for the popup code editor
  • (NEW) Option to select a default language when no language has been detected
  • (NEW) Programming languages pretty names (As opposed to all uppercase names as it has been until now)
  • (FIX) Extra lines/spaces will be trimmed
  • (FIX) Visual Editor issue that was preventing code blocks without the class attribute from being edited
  • (FIX) Non-breaking space issue that was treated as an invalid character
  • (FIX) A bug that was causing line breaks to be added when switching between the visual and the HTML editors
  • (FIX) CSS issues

1.2.0

  • (UPDATE) Amarkal Framework v0.3.4
  • (UPDATE) Completed migration to Ace Editor
  • (UPDATE) Slightly modified visual appearance

1.1.1

  • (UPDATE) Amarkal Framework v0.3.3
  • (FIX) Fixed an issue that was causing line breaks to be removed when switching between visual and HTML editor.

1.1.0

  • (NEW) Added support for bbPress
  • (NEW) Visual + HTML editor buttons with code writing tools
  • (NEW) Static/dynamic highlighting is now implemented using the great Ace Code Editor
  • (NEW) Visual editor placeholders with floating control bar
  • (UPDATE) Improved CSS

1.0.7

  • (FIX) Minor CSS fixes (tested on multiple themes)
  • (UPDATE) Amarkal Framework

1.0.6

  • (FIX) Visibility issue in FireFox (thanks zeaks!)
  • (FIX) Issue with code snippets in comments
  • (UPDATE) Code blocks are now print friendly
  • (UPDATE) Brand new admin page – see screenshots

1.0.5

  • (UPDATE) Amarkal framework update

1.0.4

  • (FIX) Prevent line numbers from being copied

1.0.3

  • (FIX) inline code segments issue
  • (FIX) no line-numbers issue
  • (UPDATE) Improved CSS styling
  • (NEW) Choose whether to show/hide meta header by line count

1.0.2

  • (FIX) script tag encoding issue
  • (UPDATE) Amarkal framework
  • (NEW) Meta header shows language name

1.0.1

  • (FIX) HTML encoding issue

1.0.0

  • Initial release