HTML Editor Syntax Highlighter


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


  • Syntax highlighting in the Post/Page HTML editor
  • NEW: Syntax highlighting in the Gutenberg Code 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.


  • Syntax highlighting in the Classic Post/Page HTML editor.
  • Quick Settings Panel.
  • Advanced Settings Panel.
  • Syntax highlighting in the Theme/Plugin editor.
  • Syntax highlighting in the Gutenberg Code Editor.
  • Example code highlighting.


Does it work with Gutenberg?

Yes! Since version 2.3.0, it works with the Gutenberg Code Editor. It may work with other code related parts in the future. Track the progress here.

I want 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.

Does it work with Internet Explorer?

Not really… It is partially supported in IE 11. Known bugs are tracked here, but won’t be fixed. Anything less that IE 10 isn’t even supported by Microsoft anymore. If you are using Internet Explorer you should get a better browser.

How do I use Fullscreen?

The fullscreen button on the top right of the editor will do one of two things depending on the „Enable full-height editor and distraction-free functionality“ setting in your „Screen Options“ (in the top right of the editor page):
* On: Toggles the „distraction free mode“.
* Off: Toggles the „fullscreen mode“.

Can I search?

Yes! Search with Ctrl+F (Cmd+F on Mac). Replace with Ctrl+alt+F (Cmd+alt+F on Mac).



Sorry I can use only japanese. グーテンベルクでハイライトは正しく表示されました。 しかし、自動改行された場合、マウスにクリックすると、X軸は正しくカーソルが選ばれますが Y軸が2行自動改行されたら2行、5行に自動改行されたら5行同時選択されます。 ブロック選択なような状態になり、入力すると意図しない違う段に挿入されることが多い


This plugin is really cool. Now I can see any error I make while coding my page and, most of all, I can save it with CTRL+S keys, and that changed my life 😀 Thanks a lot!

A plug-in has never made me cry

A plug-in has never made me cry but this one has. It is the most amazing, lightweight, and functional plugin I have ever had the honor of using. It is a must use plugin for any one serious about wordpress and frankly should be built in to wordpress.


Best plugin for designers who input manual code into text editor. Beside highlighting, options like showing end tags, auto completing end tags, fullscreen view and highlighting theme editor as well makes it perfect.
Lies alle 87 Rezensionen

Mitwirkende & Entwickler

„HTML Editor Syntax Highlighter“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:




  • Fixing JS error in issue #81 (Hopefully?)
  • Updating authorship so James can get a job. Will revert to Petr Later…


  • Support for Gutenberg Code Editor!
  • Added new themes: Codepen and WordPress (which is now the default).
  • Created new screenshots for the plugin page.
  • New Logo based on <W/>.
  • Updated FAQ with Gutenberg info.
  • Changed build steps to only export one .css and .js file


  • added Gutenberg information after the update to WordPress version 5.0


  • fixed bug: #75 removing f typo


  • fixed bug: Allow Multiple Instances of CodeMirror on a page #71
  • fixed bug: js error when custom post type does not support ‚editor‘ feature #62


  • A patch for WP 4.9. No more double editors in theme/plugin editors.


  • fixed bug: github updater in production issue #52
  • updated Codemirror to latest release version


  • fixed bug: editor was not stopping when switching between visual editor and text editor


  • added search & replace with dialog
  • added highlighting options
  • added auto-close tags and brackets option
  • added code-folding option
  • added scrollbars option
  • added keyMap options
  • added Default and None themes
  • fixed bug: made tab management agnostic to tab count and names – #50


  • added search
  • add highlighting for <!--nextpage-->
  • fixed bug: Theme and Plugin Editor not working


  • fixed bug: esc key weirdness
  • fixed bug: don’t steal editor focus from title on ‚Add New Post‘
  • fixed bug: scrollbar appears in middle of text editor
  • fixed bug: toolbar can be too big


  • now adjusts to the ‚Enable full-height editor and distraction-free functionality‘ setting
  • syntax highlighting on Theme and Plugin Editor pages
  • fixed bug: native wp editor buttons work on content – no longer overwrites with emulating buttons
  • Settings:
    • added an extendable settings panel
    • saves settings to WordPress user profile
    • added more text customization settings
  • basically rewrote the whole codebase


  • fixed bug: pre v5.4 php was causing an error – func_that_returns_array()['index'] syntax is not allowed
  • fixed bug: CodeMirror not initializing properly when new user tries to edit post for the first time
  • fixed bug: CodeMirror no longer trying to load on „All Posts“ and „All Pages“
  • fixed bug: Font and theme were reset to default when switching to the visual editor and back


  • fixed bug: return key would create two new lines and ignore indent
  • fixed bug: wp native „Add Media“ button was not working
  • added version string to .css and .js resources for cache-busting purposes


  • Ctrl-S / Cmd-S saving will now select „Save Draft“ if the post has not been published yet
  • Switched to an npm and grunt.js based build so new versions of CodeMirror can be applied easier
  • Updated CodeMirror to its latest version
  • Fixed FireFox bug: <select> drop-down would not display due to ::active state transform property
  • Fixed bug: toolbar covering text at small screen width
  • Fixed bug: switchEditors is undefined
  • Updated Css for wp 4.5
  • Added all available CodeMirror themes
  • Added syntax highlighting:
    • for WordPress shortcodes
    • for <!--more--> tags and their variants
    • NEW CodeMirror modes: shortcode.js & wordpresspost.js
  • Now calling hesh.js in an anonymous wrapper so it won’t pollute the global namespace
  • Now initializing hesh.js in an async compliant way
  • Refactored php to enqueue javascript in the WordPress friendly way
  • Tested with WordPress 4.5.2
  • Tested in all modern desktop browsers on OSX and Windows 10


  • Fixed issues with switching editor modes in WP 4.3


  • Added paragraph tag button, it’s visible only when the visual editor is disabled
  • Added minimum editor window height for the full-height mode


  • Added minimum editor window height for the full-height mode


  • Fixes for full-height mode
  • Fixed the issue with a hidden first line on smaller screens


  • Fixed the issue with a hidden first line on smaller screens


  • Fixed editor window height and resize handler
  • „headers already sent“ issue


  • Compatibility with WP 4.0
  • Fixed fullscreen mode


  • You can change font size in the editor
  • Fixed issue with restoring cursor position
  • Updated CodeMirror library
  • Some minor improvements


  • Updated CodeMirror library
  • Some minor improvements


  • Add Link button now works with page selector window
  • Some minor improvements


  • You can now select Light or Dark editor colour theme


  • Fixed issue when „Add Media“ button stopped working
  • Fixed editor resize bug in Visual mode.


  • Bug fixing


  • Add Media button now works correctly in Text mode
  • Fixed jumping cursor issue when ‘:’, ‚{‚, ‚}‘ keys are pressed


  • Fixed jumping cursor issue when ‘/’ key is pressed.


  • Fixed a focus bug


  • Toggle fullscreen mode with F11/Esc hotkeys
  • Publish Post/Page hotkeys Ctrl + S / Cmd + S
  • Fixed some bugs for IE 8
  • Added development files to the zip bundle


  • New fullscreen mode
  • Remembers tab state
  • Editor resize handler
  • Code refactoring and minification for better loading performance


  • Updated CodeMirror library
  • Increased loading performance
  • Match brackets


  • CodeMirror library updated to version 3.02
  • Added quick-tags toolbar buttons
  • Preserve the scroll position after update or page reload


  • vertical resize for the editing box (works on FireFox, Chrome, Safari).
  • not working buttons/tags was hidden


Bug fix:
* plugin does not work in new post/page.


Bug fix (thanks to collinprice):
* when user has the visual editor disabled this plugin does not show up.