Type to search.

#691 by installs

HTML Editor Syntax Highlighter

by Peter MukhortovVersion 2.5.0

Add syntax highlighting to WordPress code editors using CodeMirror.js

Active installs
60,000+
#691 of 1,000
Downloads, all time
613.7K
613,672
Downloads, 30 days
16.8K
5.4K in the last 7
Rating
4.4 / 5
110 reviews
Last updated
9 days ago
Oct 22, 2026
Version
2.5.0
49 releases

Upkeep and compatibility

Last updatedOctober 22, 2026Updated in the last 3 months
Tested up toWordPress 7.1.4Covers WordPress 7.1.4, the current release
Needs WordPress6.5 or newer
Needs PHP7.4 or newer
First publishedApril 18, 2012
Support, last two monthsNo threads opened

Reviews

4.4 / 5 from 110 reviews

Reviews by star rating
5 stars79
4 stars14
3 stars7
2 stars5
1 star5

Downloads, last 30 days

Low 21 a dayHigh 10K a day

What the author says it does

Add syntax highlighting in the Classic Post & Page HTML text editor, Gutenberg Code Editor, and Theme & Plugin editors using CodeMirror.js

Features

  • Syntax highlighting in the Post/Page HTML editor
  • NEW: Syntax highlighting in the Gutenberg Code Editor (not Visual Editor)
  • Syntax highlighting in the Theme & Plugin editors
  • Syntax highlighting for WordPress [shortcodes/]
  • Save your posts and pages pressing Ctrl+S (Cmd+S on Mac)
  • Restore cursor position after page is reloaded
  • Huge selection of themes and other customization options
  • Fullscreen mode: toggle with F11/Esc hotkeys

If you would like to contribute to this plugin, view the github repo.

The opening of the plugin's own description. The full text, installation notes and changelog are on its WordPress.org page.

Questions the author answers

Does it work with Gutenberg?

Yes! Partially… Since version 2.3.0, it works with the Gutenberg Code Editor, but only the Code Editor, not the Visual Editor. Press Ctrl+Shift+Alt+M / Cmd+Shift+Alt+M to switch between the Visual Editor and the Code Editor.

It does not work with blocks in the Gutenberg Visual Editor. This means it does not highlight code in:

* The Edit as HTML section of every block

* The Custom HTML block

How do I get the Classic Editor back!?

Since WordPress version 5.0, Gutenberg is the default editor. If you want this plugin to work the way it used to, you’ll have to download the Classic Editor plugin.

Can I search and replace?

Function: WINDOWS / MAC

Start searching: Ctrl-F / Cmd-F

Find next: Ctrl-G / Cmd-G

Find previous: Shift-Ctrl-G / Shift-Cmd-G

Replace: Shift-Ctrl-F / Cmd-Opt-F

Replace all: Shift-Ctrl-R / Shift-Cmd-Opt-F

Persistent search: Alt-F (dialog doesn’t auto-close, Enter to find next, Shift-Enter to find previous)

Jump to line: Alt-G

Why are p and br tags are being removed?

WordPress has a feature called the ‘auto p’ filter which:

“Changes double line-breaks in the text into HTML paragraphs.”

For example, auto p will take some standard post content like this:

Some long text that has many lines.

And paragraphs in it.

and turn it into something like this:

<p>Some long text<br/> that has many lines</p> <p>And paragraphs in it.</p>

Why is my code is being reformatting when I switch to the Visual Editor and back?

The WordPress Visual Editor needs to reformat code in order to function correctly. This is not something that this plugin can fix. You can disable the Visual Editor entirely by going to: Users > Your Profile > Visual Editor: check ‘Disable the visual editor when writing’.

Scrollbars are not appearing! / Scroll position is not reset! / Code window is not resizable!

You may have the ‘Enable full-height editor and distraction-free functionality’ turned on. This is a native WordPress feature that changes the scrolling and fullscreen behavior of both the Code Editor and Visual Editor.

Latest changelog entry

2.5.0

  • Tested with WordPress 7.1. Now requires WordPress 6.5 or later and PHP 7.4 or later.
  • Fixed: in the Gutenberg Code Editor, changes were lost when switching back to the Visual Editor with the keyboard shortcut. Changes are now saved as you type.
  • Fixed: the highlighter did not start when a post opened directly in the Gutenberg Code Editor.
  • Fixed: undoing with the Gutenberg toolbar, or content changed by saving, now shows up in the Code Editor.
  • Fixed: Gutenberg Code Editor layout styles for WordPress 6.6 and later.

Screenshots

First 4 of 7, from WordPress.org.

Tagged

Where this page's numbers come from

Read from the WordPress.org plugin API on , when WordPress 7.1.4 was the current release. WordPress.org rounds active installs into buckets. These are the directory's figures, not my verdict, and I haven't tested this plugin. The author takes donations at their donate page.