>
Download This Plugin | |
Download Elegant Themes | |
Name | Enlighter - Customizable Syntax Highlighter |
Version | 2.5 |
Author | Andi Dittrich |
Rating | 88 |
Last updated | 2015-01-24 12:27:00 |
Downloads |
7619
|
Download Plugins Speed Test plugin for Wordpress |
Home page PageSpeed score has been degraded by 0%, while Post page PageSpeed score has been degraded by 0%
Enlighter - Customizable Syntax Highlighter plugin added 180 kB of resources to the Home page and 180 kB of resources to the sample Post page.
Enlighter - Customizable Syntax Highlighter plugin added 0 new host(s) to the Home page and 0 new host(s) to the sample Post page.
Great! Enlighter - Customizable Syntax Highlighter plugin ads no tables to your Wordpress blog database.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) A theme demo can be found here
Highlight javascript code (theme defined on your settings page)
[js]
window.addEvent('domready', function(){
console.info('Hello Enlighter');
});
[/js]
Lorem ipsum dolor sit amet, [js]window.alert('Hello World');[/js] consetetur sadipscing elitr,
sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
Shortcode Style
Just add the highlight
attribute with the lines you wish to point out
[js highlight="2"]
window.addEvent('domready', function(){
console.info('Hello Enlighter');
});
[/js]
Visual Editor You have to edit the generated html tag by switching to Text-Mode
<pre class="EnlighterJSRAW" data-enlighter-language="js" data-enlighter-highlight="2">
window.addEvent('domready', function(){
console.info('Hello Enlighter');
});
</pre>
Display multiple codes within a tab-pane. You can define a custom tab-pane title for each snippet if you want.
[codegroup]
[js tab="Javascript Message"]
window.addEvent('domready', function(){
// display string on console
console.info('Hello Enlighter');
// show element
$('#myelement').show();
});
[/js]
[html]
<div id="myelement">
INITIALIZATION START
</div>
[/html]
[css tab="Styling"]
#myelement{
color: #cc2222;
padding: 15px;
font-size: 20px;
text-align: center;
}
[/css]
[/codegroup]
It's also possible to use the plugin with legacy shortcode (disabled language shortcodes)
[enlighter lang="js"]
window.addEvent('domready', function(){
// display string on console
console.info('Hello Enlighter');
// show element
$('#myelement').show();
});
[/enlighter]
Please keep in mind that not all translations are up to date. You are welcome to contribute!