Highlight code blocks. Developed by Anna Svensson.
Download ZIP file and copy it into your system/extensions folder. Learn more about extensions.
Wrap your code block in ``` and add a language identifier.
The following programming languages are included: C, CPP, CSS, HTML, JavaScript, JSON, Lua, PHP, Python, YAML. You can download more language files, rename and copy them into your system/workers folder.
Highlighting of JavaScript code:
``` javascript
var ready = function() {
console.log("Hello world");
}
window.addEventListener("DOMContentLoaded", ready, false);
```
Highlighting of HTML code, with and without line number:
``` html {.with-line-number}
<div class="content">
<p>Hello world</p>
</div>
```
``` html {.without-line-number}
<div class="content">
<p>Hello world</p>
</div>
```
The following settings can be configured in file system/extensions/yellow-system.ini:
HighlightLineNumber = show line number, 1 or 0
HighlightAutodetectLanguages = languages for automatic detection, comma separated
This extension includes highlight.php 9.18.1.10 by Ivan Sagalaev and Geert Bergman. Thank you for the good work.
Do you have questions? Get help.
