|
2 | 2 | Contributors: Andi Dittrich, aenondynamics
|
3 | 3 | Tags: syntax highlighting, javascript, code, coding, sourcecode, mootools, jquery, 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
|
4 | 4 | Donate link: https://enlighterjs.org
|
5 |
| -Requires at least: 4.8 |
6 |
| -Tested up to: 4.9 |
7 |
| -Stable tag: 4.0 |
| 5 | +Requires at least: 5.0 |
| 6 | +Tested up to: 5.2 |
| 7 | +Stable tag: 4.0.0 |
8 | 8 | License: GPL-2.0
|
9 |
| -License URI: http://opensource.org/licenses/MIT |
| 9 | +License URI: https://opensource.org/licenses/gpl-2.0.php |
10 | 10 |
|
11 |
| -Simple post syntax-highlighted code using the EnlighterJS Javascript Plugin. |
| 11 | +All-in-one Syntax Highlighting solution. Full Gutenberg and Classic Editor integration. Graphical theme customizer. Based on EnlighterJS. |
12 | 12 |
|
13 | 13 | ## Description ##
|
14 | 14 |
|
15 |
| -Enlighter is a free, easy-to-use, syntax highlighting tool for WordPress. It's build in PHP and uses the MooTools(Javascript) based [EnlighterJS](http://enlighterjs.org) to provide a beautiful code-appearance. |
16 |
| -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!** |
| 15 | +Enlighter is a free, easy-to-use, syntax highlighting tool for WordPress. Highlighting is powered by the [EnlighterJS](http://enlighterjs.org) javascript library to provide a beautiful code-appearance. |
| 16 | + |
| 17 | +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! |
| 18 | + |
| 19 | +An easy to use Theme-Customizer is included to modify the build-in themes **without any css knowlegde!** |
17 | 20 | It also supports the automatic creation of tab-panes to display code-groups together (useful for multi-language examples - e.g. html+css+js)
|
| 21 | + |
18 | 22 | [Theme Demo](https://enlighterjs.org/Theme.Enlighter.html "EnlighterJS Theme Browser") - [Language Examples](https://enlighterjs.org/Language.Javascript.html "EnlighterJS Language Example")
|
19 | 23 |
|
20 | 24 | ### Plugin Features ###
|
21 |
| -* Support for all common used languages including powerful generic highlighting |
22 |
| -* **Full** Visual-Editor (TinyMCE) Integration (Admin Panel + Frontend) |
| 25 | + |
| 26 | +* **Full Gutenberg Editor Integration** |
| 27 | +* **Full Classic Editor Integration** (TinyMCE) |
| 28 | +* Support for all common used languages |
| 29 | +* Powerful generic highlighting engine for unknown languages |
23 | 30 | * Theme Customizer including **LIVE Preview Mode**
|
24 | 31 | * Inline Syntax Highlighting
|
25 |
| -* Tab-Indentation mode to align code with the `tab` key (single line and block selection) |
26 |
| -* Markdown fenced code blocks |
27 |
| -* [bbPress](https://bbpress.org/) shortcode + markdown code blocks support |
28 |
| -* Shortcodes within content, comments and widgets |
29 |
| -* Easy to use Text-Editor mode through the use of Shortcodes and QuickTags |
30 | 32 | * Advanced configuration options (CDN usage, ..) are available within the options page.
|
31 | 33 | * Supports code-groups (displays multiple code-blocks within a tab-pane)
|
32 | 34 | * Extensible language and theme engines - add your own one.
|
33 | 35 | * Simple CSS based themes
|
34 | 36 | * Integrated CSS file caching (suitable for high traffic sites)
|
35 |
| -* Standalone Shortcode-Processor to avoid wpautop filter issues in Text-Editor Mode |
36 | 37 | * Webfont Loader to add missing Monospace Fonts to your website
|
| 38 | +* **Full GPDR compliant** - no external resources are required, no data will be aggregated |
37 | 39 |
|
38 |
| -### Tutorials and Examples ### |
| 40 | +### Gutenberg Editor Integration ### |
| 41 | +* **Full Editor Integration** via "Enlighter Sourcecode" block |
| 42 | +* Automatic transformations for classic editor posts (codeblocks converted to Enlighter Sourcecode block) |
| 43 | +* Transform legacy codeblocks to Enlighter Gutenberg Blocks (manual transformation) |
| 44 | +* [Docs and Usage](https://github.com/EnlighterJS/Plugin.WordPress/blob/master/docs/Usage_GutenbergEditor.md) |
| 45 | +* [Editor plugin repository](https://github.com/EnlighterJS/Plugin.Gutenberg) |
| 46 | + |
| 47 | +### Classic Editor (TinyMCE) Integration ### |
| 48 | +* **Full Editor Integration** via Enlighter buttons in the toolbar |
| 49 | +* Inline Syntax Highlighting |
| 50 | +* Tab-Indentation mode to align code with the `tab` key (single line and block selection) |
| 51 | +* Editor formats to highlight existing code |
| 52 | +* [Docs and Usage](https://github.com/EnlighterJS/Plugin.WordPress/blob/master/docs/Usage_VisualEditor.md) |
| 53 | +* [Editor plugin repository](https://github.com/EnlighterJS/Plugin.TinyMCE) |
| 54 | +* [Classic Editor Live-Demo](https://tinymce.enlighterjs.org/) |
| 55 | + |
| 56 | +### Markdown ### |
| 57 | +* Markdown fenced code blocks |
| 58 | +* Inline Syntax Highlighting via backtick code (including language specific addon) |
| 59 | +* [Docs and Usage](https://github.com/EnlighterJS/Plugin.WordPress/blob/master/docs/Usage_Markdown.md) |
39 | 60 |
|
40 |
| -* [Enlighter Visual Editor Usage](https://github.com/EnlighterJS/Plugin.WordPress/blob/master/docs/Usage_VisualEditor.md) - Howto add Code Snippets to your posts and pages |
41 |
| -* [Enlighter Markdown Usage](https://github.com/EnlighterJS/Plugin.WordPress/blob/master/docs/Usage_Markdown.md) - Howto use Markdown fenced codeblocks |
42 |
| -* [Enlighter Visual Editor Live-Demo](https://tinymce.enlighterjs.org/) |
| 61 | +### Compatibility/Migration |
| 62 | +* Crayon compatibility mode (use EnlighterJS highlighting for legacy Crayon `pre` codeblocks) |
| 63 | +* Jetpack markdown compatibility mode (generic or raw highlighting) |
| 64 | +* Gutenberg standard codeblock compatibility mode (no language attributes) |
| 65 | + |
| 66 | +## Extensions ## |
| 67 | +* [bbPress](https://bbpress.org/) shortcode + markdown code blocks support |
| 68 | +* Dynamic Content via `jQuery Ajax.load` |
| 69 | +* Dynamic Content via `Jetpack.InfiniteScroll` |
| 70 | + |
| 71 | +### Texteditor/Shortcodes (Legacy) ### |
| 72 | + |
| 73 | +Shortcodes are deprecated and should be used in **text editor mode only** - never use them within Gutenberg Editor or Classic Editor! |
| 74 | + |
| 75 | +* Easy to use Text-Editor mode through the use of Shortcodes and QuickTags |
| 76 | +* Shortcodes within content, comments and widgets |
| 77 | +* Standalone Shortcode-Processor to avoid wpautop filter issues in Text-Editor Mode |
43 | 78 |
|
44 | 79 | ### Supported Languages (build-in) ###
|
| 80 | + |
| 81 | +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](https://github.com/EnlighterJS/EnlighterJS/issues) |
| 82 | + |
45 | 83 | Click to view Language/Theme Examples
|
46 | 84 |
|
47 |
| -* [AVR Assembly](https://enlighterjs.org/Language.AVR-Assembly.html) |
48 |
| -* [Generic Assembly](https://enlighterjs.org/Language.Assembly.html) |
49 |
| -* [C](https://enlighterjs.org/Language.C.html) |
50 |
| -* [CSS](https://enlighterjs.org/Language.CSS.html) |
51 |
| -* [C#](https://enlighterjs.org/Language.CSharp.html) |
52 |
| -* [C++](https://enlighterjs.org/Language.Cpp.html) |
53 |
| -* [Cython](https://enlighterjs.org/Language.Cython.html) |
54 |
| -* [Diff](https://enlighterjs.org/Language.Diff.html) |
55 |
| -* [Generic](https://enlighterjs.org/Language.Generic.html) |
56 |
| -* [HTML](https://enlighterjs.org/Language.HTML.html) |
57 |
| -* [Ini](https://enlighterjs.org/Language.Ini.html) |
58 |
| -* [JSON](https://enlighterjs.org/Language.JSON.html) |
59 |
| -* [Java](https://enlighterjs.org/Language.Java.html) |
60 |
| -* [Javascript](https://enlighterjs.org/Language.Javascript.html) |
61 |
| -* [Kotlin](https://enlighterjs.org/Language.Kotlin.html) |
62 |
| -* [LUA](https://enlighterjs.org/Language.LUA.html) |
63 |
| -* [MarkDown](https://enlighterjs.org/Language.MarkDown.html) |
64 |
| -* [Matlab](https://enlighterjs.org/Language.Matlab.html) |
65 |
| -* [NSIS](https://enlighterjs.org/Language.NSIS.html) |
66 |
| -* [PHP](https://enlighterjs.org/Language.PHP.html) |
67 |
| -* [Python](https://enlighterjs.org/Language.Python.html) |
68 |
| -* [RAW](https://enlighterjs.org/Language.RAW.html) |
69 |
| -* [Ruby](https://enlighterjs.org/Language.Ruby.html) |
70 |
| -* [Rust](https://enlighterjs.org/Language.Rust.html) |
71 |
| -* [SQL](https://enlighterjs.org/Language.SQL.html) |
72 |
| -* [Squirrel](https://enlighterjs.org/Language.Squirrel.html) |
73 |
| -* [Shell](https://enlighterjs.org/Language.Shell.html) |
74 |
| -* [VHDL](https://enlighterjs.org/Language.VHDL.html) |
75 |
| -* [XML](https://enlighterjs.org/Language.XML.html) |
76 |
| - |
77 |
| -### Shortcode Quickstart Example ### |
78 |
| -Highlight javascript code (theme defined on your settings page) |
79 |
| - |
80 |
| - [js] |
81 |
| - window.addEvent('domready', function(){ |
82 |
| - console.info('Hello Enlighter'); |
83 |
| - }); |
84 |
| - [/js] |
85 |
| - |
86 |
| -### Inline Syntax Highlighting with Shortcode ### |
87 |
| - |
88 |
| - Lorem ipsum dolor sit amet, [js]window.alert('Hello World');[/js] consetetur sadipscing elitr, |
89 |
| - sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. |
90 |
| - |
91 |
| -### Codegroup Example ### |
92 |
| -Display multiple codes within a tab-pane. You can define a custom tab-pane title for each snippet if you want. |
93 |
| - |
94 |
| - [codegroup] |
95 |
| - [js tab="Javascript Message"] |
96 |
| - window.addEvent('domready', function(){ |
97 |
| - // display string on console |
98 |
| - console.info('Hello Enlighter'); |
99 |
| - |
100 |
| - // show element |
101 |
| - $('#myelement').show(); |
102 |
| - }); |
103 |
| - [/js] |
104 |
| - |
105 |
| - [html] |
106 |
| - <div id="myelement"> |
107 |
| - INITIALIZATION START |
108 |
| - </div> |
109 |
| - [/html] |
110 |
| - |
111 |
| - [css tab="Styling"] |
112 |
| - #myelement{ |
113 |
| - color: #cc2222; |
114 |
| - padding: 15px; |
115 |
| - font-size: 20px; |
116 |
| - text-align: center; |
117 |
| - } |
118 |
| - [/css] |
119 |
| - [/codegroup] |
120 |
| - |
121 |
| -### Legacy Example ### |
122 |
| -It's also possible to use the plugin with legacy shortcode (disabled language shortcodes) |
123 |
| - |
124 |
| - [enlighter lang="js"] |
125 |
| - window.addEvent('domready', function(){ |
126 |
| - // display string on console |
127 |
| - console.info('Hello Enlighter'); |
128 |
| - |
129 |
| - // show element |
130 |
| - $('#myelement').show(); |
131 |
| - }); |
132 |
| - [/enlighter] |
133 |
| - |
134 |
| - |
135 |
| -### Translations (I18n) ### |
136 |
| -Please keep in mind that not all translations are up to date. You are welcome to contribute! |
137 |
| - |
138 |
| -* **English** (default) |
139 |
| -* **German** (de_DE by Andi Dittrich) |
140 |
| -* **Serbo-Croatian** (sr_RS by Borisa Djuraskovic from webhostinghub.com) |
141 |
| - |
| 85 | + |
| 86 | + |
142 | 87 | ### Related Links ###
|
143 | 88 | * [Enlighter Plugin Docs + Tutorials](https://github.com/EnlighterJS/Plugin.WordPress/docs)
|
144 | 89 | * [Enlighter Plugin on GitHub](https://github.com/EnlighterJS/Plugin.WordPress)
|
145 |
| -* [EnlighterJS Documentation](https://enlighterjs.org) |
| 90 | +* [EnlighterJS Documentation](http://enlighterjs.org) |
146 | 91 |
|
147 | 92 | ## Compatibility ##
|
148 | 93 |
|
149 |
| -All browsers modern browser like Firefox, Google Chrome, Edge as well as Internet Explorer 10+ are supported by EnlighterJS. Older browsers are not supported! |
| 94 | +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. |
| 95 | + |
| 96 | +* Chrome 60+ |
| 97 | +* Firefox 60+ |
| 98 | +* Safari 11+ |
| 99 | +* Edge Browser 10+ |
| 100 | + |
| 101 | +## Installation ## |
150 | 102 |
|
151 | 103 | ### System requirements ###
|
152 |
| -* PHP 5.4, including `json` functions |
153 |
| -* Webbrowser with enabled Javascript (required for highlighting) |
| 104 | +* PHP 5.6, including `json` functions |
| 105 | +* Modern webbrowser with enabled Javascript (required for highlighting) |
154 | 106 | * Accessable cache directory (`/wp-content/plugins/enlighter/cache/`)
|
155 | 107 |
|
156 | 108 | ### Installation ###
|
157 | 109 | 1. Download the .zip file of the plugin and extract the content
|
158 | 110 | 2. Upload the complete `enlighter` folder to the `/wp-content/plugins/` directory
|
159 | 111 | 3. Activate the plugin through the 'Plugins' menu in WordPress
|
160 | 112 | 4. Goto to the Enlighter settings page and select the default theme which should be used.
|
161 |
| -5. That's it! You're done. You can select an editor style for your codefragment or enter the following code into a post or page to highlight it (e.g. javascript): `[js]var enlighter = new EnlighterJS({});[/js]` |
| 113 | +5. That's it! You're done. Just go into your editor and add an Enlighter codeblock via Gutenberg Blocks menu or Classic Editor toolbar |
162 | 114 |
|
163 | 115 | ## Screenshots ##
|
164 | 116 |
|
|
0 commit comments