EnlighterJS/Plugin.WordPress
Stars: 109
Forks: 15
Pull Requests: 7
Issues: 336
Watchers: 3
Last Updated: 2023-02-11 11:44:14
:package: Official WordPress Plugin of EnlighterJS
License: GNU General Public License v2.0
Languages: PHP, CSS, JavaScript, Shell, HTML, Dockerfile
http://wordpress.org/plugins/enlighter/
Contributors: Andi Dittrich, aenondynamics
Tags: syntax highlighting, syntax highlighter, highlighter, highlighting, classic editor, gutenberg, javascript, code, coding, sourcecode,customizable, visual editor, tinymce, themes, css, html, php, js, xml, c, cpp, c#, ruby, shell, java, python, sql, rust, matlab, json, ini, config, cython, lua, assembly, asm
Donate link: https://enlighterjs.org
Requires at least: 6.0
Tested up to: 6.1
Stable tag: 4.6.0
License: GPL-2.0
License URI: https://opensource.org/licenses/gpl-2.0.php
All-in-one Syntax Highlighting solution. Full Gutenberg and Classic Editor integration. Graphical theme customizer. Based on EnlighterJS.
Enlighter is a free, easy-to-use, syntax highlighting tool for WordPress. Highlighting is powered by the EnlighterJS javascript library to provide a beautiful code-appearance.
Using it can be as simple as adding a new Enlighter Sourcecode block (Gutenberg) and insert the code which you want to highlight: 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)
- Full Gutenberg Editor Integration
- Full Classic Editor Integration (TinyMCE)
- Support for all common used languages
- Powerful generic highlighting engine for unknown/unsupported languages
- Theme Customizer
- Inline Syntax Highlighting
- Advanced configuration options 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)
- Full GDPR compliant - no external resources are required, no data will be aggregated
- Full Editor Integration via "Enlighter Sourcecode" block
- Inline Syntax Highlighting
- Automatic transformations for classic editor posts (codeblocks converted to Enlighter Sourcecode block)
- Transform legacy codeblocks to Enlighter Gutenberg Blocks (manual transformation)
- Docs and Usage
- Editor plugin repository
- Markdown fenced code blocks
- Inline Syntax Highlighting via backtick code (including language specific addon)
- Docs and Usage
- Crayon compatibility mode (use EnlighterJS highlighting for legacy Crayon
pre
codeblocks)
- CodeColorer compatibility mode (use EnlighterJS highlighting for legacy CodeColorer shortcodes)
- Jetpack markdown compatibility mode (generic or raw highlighting)
- Gutenberg standard codeblock compatibility mode (no language attributes)
- bbPress shortcode + markdown code blocks support
- Dynamic Content via
jQuery Ajax.load
- Dynamic Content via
Jetpack.InfiniteScroll
Shortcodes are deprecated and should be used in text editor mode only - never use them within Gutenberg Editor or Classic Editor!
- Easy to use Text-Editor mode through the use of Shortcodes and QuickTags
- Shortcodes within content, comments and widgets
- Standalone Shortcode-Processor to avoid wpautop filter issues in Text-Editor Mode
In case your language is not available try the Generic Mode which covers a lot of programming languages - or request a new language on GitHub
All modern webbrowsers with enabled Javascript and HTML5 capabilities for "data-" attributes are compatible with Enlighter. It's possible that it may work with earlier/other browsers.
- Chrome 60+
- Firefox 60+
- Safari 11+
- Edge Browser 10+
- WordPress
6.0
- PHP
7.4
, including json
functions
- Modern webbrowser with enabled Javascript (required for highlighting)
- Accessable cache directory (
/wp-content/plugins/enlighter/cache/
)
- Download the .zip file of the plugin and extract the content
- Upload the complete
enlighter
folder to the /wp-content/plugins/
directory
- Activate the plugin through the 'Plugins' menu in WordPress
- Goto to the Enlighter settings page and select the default theme which should be used.
- That's it! You're done. Just go into your editor and add an Enlighter codeblock via Gutenberg Blocks menu or Classic Editor toolbar
- HTML highlighting Example (Enlighter Theme)
- Visual Editor Integration
- Visual Editor Code Settings
- Visual Editor Inline/Block Formats
- Options Page - Appearance Settings
- Options Page - Advanced Settings
- Theme Customizer - General styles
- Theme Customizer - Language Token styling
- Special options for use with a CDN (Content Delivery Network)
- Tab-Pane Example (multiple languages)
- Frontend Editing using wp_editor feature
- Theme Customizer - Live Preview-Mode
Everything has been changed - read enlighterjs.org/wp-v4 before upgrading - THIS RELEASE IS NOT BACKWARD COMPATIBLE
The WordPress plugin related FAQ page is available on GitHub within the documentation repository!