Best Free Syntax Highlighter WordPress Plugins

August 9, 2018| PhantomThemes Editorial

1. Enlighter – Customizable Syntax Highlighter

Description

Enlighter is a free, easy-to-use, syntax highlighting tool for WordPress. It’s build in PHP and uses the MooTools(Javascript) based EnlighterJS to provide a beautiful code-appearance.
Using it can be as simple as selecting an editor style or adding shortcode around your scripts which you want to highlight and Enlighter takes care of the rest. An easy to use Theme-Customizer is included to modify the build-in themes without any css knowlegde!
It also supports the automatic creation of tab-panes to display code-groups together (useful for multi-language examples – e.g. html+css+js)
Theme Demo – Language Examples

PLUGIN FEATURES

  • Support for all common used languages including powerful generic highlighting
  • Full Visual-Editor (TinyMCE) Integration (Admin Panel + Frontend)
  • Theme Customizer including LIVE Preview Mode
  • Inline Syntax Highlighting
  • Tab-Indentation mode to align code with the tab key (single line and block selection)
  • Markdown fenced code blocks
  • bbPress shortcode + markdown code blocks support
  • Shortcodes within content, comments and widgets
  • Easy to use Text-Editor mode through the use of Shortcodes and QuickTags
  • Advanced configuration options (CDN usage, ..) are available within the options page.
  • Supports code-groups (displays multiple code-blocks within a tab-pane)
  • Extensible language and theme engines – add your own one.
  • Simple CSS based themes
  • Integrated CSS file caching (suitable for high traffic sites)
  • Standalone Shortcode-Processor to avoid wpautop filter issues in Text-Editor Mode
  • Webfont Loader to add missing Monospace Fonts to your website

TUTORIALS AND EXAMPLES

SUPPORTED LANGUAGES (BUILD-IN)

Click to view Language/Theme Examples

TRANSLATIONS (I18N)

Please keep in mind that not all translations are up to date. You are welcome to contribute!

  • English (default)
  • German (de_DE by Andi Dittrich)
  • Serbo-Croatian (sr_RS by Borisa Djuraskovic from webhostinghub.com)

COMPATIBILITY

All browsers supported by MooTools (enabled Javascript required) and with HTML5 capabilities for “data-” attributes are compatible with Enlighter. It’s possible that it may work with earlier/other browsers.
Generally Enlighter (which javascript part EnlighterJS is based on MooTools Javascript Framework) should work together with jQuery in noConflict Mode – when you are using jQuery within your WordPress Theme/Page you have to take care of it!

  • Chrome 10+
  • Safari 5+
  • Internet Explorer 6+
  • Firefox 2+
  • Opera 9

2. Prismatic

Description

GDPR-compliant: Prismatic does not collect any user data

The only 3-in-1 syntax highlighter!

Display beautiful code snippets with Prism.js, Highlight.js, or plain code escaping:

  • Prism.js – Code escape + syntax highlight using Prism.js
  • Highlight.js – Code escape + syntax highlight using Highlight.js
  • Plain Flavor – Code escape without syntax highlight (for custom styles)

Prism.js Features

  • Supports 41 coding languages
  • Choose from all 8 available Prism themes
  • Enable Prism plugin Line Numbers
  • Enable Prism plugin Line Highlight
  • Enable Prism plugin Show Language
  • Highlights code in post content, excerpts, and comments
  • Detects language- and lang- class prefixes
  • Limit syntax highlighting to Posts and Pages
  • Highlight single-line and multi-line code
  • Granular control over code escaping
  • Smart loading of CSS & JS assets

Highlight.js Features

  • Supports 31 coding languages
  • Choose from all 79 available Highlight themes
  • Customize the Highlight.js init JavaScript
  • Highlights code in post content, excerpts, and comments
  • Limit syntax highlighting to Posts and Pages
  • Highlight multi-line blocks of code
  • Detects language- and lang- class prefixes
  • Enable support for no-prefix class names
  • Granular control over code escaping
  • Smart loading of CSS & JS assets

Plain Flavor Features

  • Enable code escaping for post content, excerpts, and/or comments
  • Enable code escaping on the frontend, Admin Area, or both
  • Escapes single-line and multi-line code snippets

General Features

  • Easy to set up & configure
  • Built with the WordPress API
  • Squeaky clean, error-free code
  • Born of simplicity, no frills
  • Lightweight, fast and flexible
  • Focused on performance and security
  • Loads CSS/JS assets only when required
  • Adheres to HTML coding best practices
  • Regularly updated and “future proof
Categories: WordPress Tips and Tricks

Leave a Reply

Your email address will not be published. Required fields are marked *

Rating*