Written on 29 June 2015. Posted in Plugins for Joomla
How to highlight examples the source code or syntax in Joomla? There are many extensions on the official website, but for some reason they are not satisfied. This is a new plugin for source code, syntax highlight in Joomla - Prism.
The plugin uses the javascript-library Prism for highlight. All you need is just install the plugin, activate, select a theme. Done!
Further in the text of the material, you can use the code:
<pre class="line-numbers" data-start="1"><code language="language-xxx">p { color: red; }</code></pre>
where:
line-numbers – line numbering will be use;
data-start – start value for counter(can be negative);
language-css – language code. Language codes.
Do not use a <pre> tag if do not want block highlight.
Download:
plg_prism_0.0.4.zipMD5: a425cd42c8a1de49c9c967cd369d19ad
SHA-1: d5b2190c51c7e4d699587ec7c5eb1a2978f6840b
Distributed under GNU GPLv2
CSS
pre.line-numbers {
position: relative;
padding-left: 3.8em;
counter-reset: linenumber;
}
pre.line-numbers > code {
position: relative;
}
Continue Reading